Skip to content

Commit

Permalink
Merge pull request #167 from shankari/fix_map_change
Browse files Browse the repository at this point in the history
Create a "Fix Map" button for the diary list as well
  • Loading branch information
shankari authored Oct 7, 2016
2 parents 2499cb5 + df262dd commit aecfc5f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
8 changes: 8 additions & 0 deletions www/js/diary/list.js
Original file line number Diff line number Diff line change
Expand Up @@ -290,13 +290,21 @@ angular.module('emission.main.diary.list',['ui-leaflet',
{
target: '.diary-entry',
content: 'Click on the map to see more details about each trip.'
},
{
target: '.refresh-tiles',
content: 'Use this to fix the map tiles if they have not loaded properly.'
}]
};

var startWalkthrough = function () {
nzTour.start(tour);
};

$scope.refreshTiles = function() {
$scope.$broadcast('invalidateSize');
};

/*
* Checks if it is the first time the user has loaded the diary tab. If it is then
* show a walkthrough and store the info that the user has seen the tutorial.
Expand Down
3 changes: 3 additions & 0 deletions www/templates/diary/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
<ion-nav-buttons side="right">
<button class="button button-icon ion-help" ng-click="startWalkthrough()"></button>
</ion-nav-buttons>
<ion-nav-buttons side="left">
<button class="button refresh-tiles" ng-click="refreshTiles()">Fix Map</button>
</ion-nav-buttons>
</ion-nav-bar>
<div style="background-color: transparent; border-left-style: solid; border-left-width: 0.5px; border-left-color: #212121; margin-left: 10%; position: absolute; float: left; height: 100%;"></div>
<ion-content class="diary-entry">
Expand Down

0 comments on commit aecfc5f

Please sign in to comment.