From 8b9f3948b05f4b1aaf2abc015d3ba2d1e2c500c1 Mon Sep 17 00:00:00 2001 From: blavenie <benoit.lavenier@e-is.pro> Date: Wed, 25 Oct 2017 20:28:21 +0200 Subject: [PATCH] [fix] Map profile: set map id, to avoid error when navigate on many map views --- www/plugins/es/js/controllers/profile-controllers.js | 1 + www/plugins/es/templates/document/item_document.html | 1 - www/plugins/map/js/controllers/user-controllers.js | 1 + www/plugins/map/templates/user/edit_profile_extend.html | 3 ++- 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/www/plugins/es/js/controllers/profile-controllers.js b/www/plugins/es/js/controllers/profile-controllers.js index ed21fbad6..156960c22 100644 --- a/www/plugins/es/js/controllers/profile-controllers.js +++ b/www/plugins/es/js/controllers/profile-controllers.js @@ -11,6 +11,7 @@ angular.module('cesium.es.profile.controllers', ['cesium.es.services']) controller: 'ESViewEditProfileCtrl' } }, + cache: false, data: { auth: true } diff --git a/www/plugins/es/templates/document/item_document.html b/www/plugins/es/templates/document/item_document.html index 9f5eaf60f..2f9a8d80b 100644 --- a/www/plugins/es/templates/document/item_document.html +++ b/www/plugins/es/templates/document/item_document.html @@ -1,6 +1,5 @@ <ion-item id="doc-{{::doc.id}}" class="item item-document item-icon-left ink {{::ionItemClass}} no-padding-top no-padding-bottom" - ng-class="{{::ionItemClass}}" ng-click="selectDocument(doc)"> <i class="icon ion-document stable" ng-if=":rebind:!doc.avatar"></i> diff --git a/www/plugins/map/js/controllers/user-controllers.js b/www/plugins/map/js/controllers/user-controllers.js index 246a4711f..692a48b16 100644 --- a/www/plugins/map/js/controllers/user-controllers.js +++ b/www/plugins/map/js/controllers/user-controllers.js @@ -33,6 +33,7 @@ angular.module('cesium.map.user.controllers', ['cesium.services', 'cesium.map.se } }); $scope.loading = true; + $scope.mapId = 'map-profile-' + $scope.$id; $scope.enter = function(e, state) { diff --git a/www/plugins/map/templates/user/edit_profile_extend.html b/www/plugins/map/templates/user/edit_profile_extend.html index 94757d48b..9f1706f9a 100644 --- a/www/plugins/map/templates/user/edit_profile_extend.html +++ b/www/plugins/map/templates/user/edit_profile_extend.html @@ -1,5 +1,6 @@ <div class="item no-padding {{ionItemClass}}" ng-if="formData.geoPoint && formData.geoPoint.lat && formData.geoPoint.lon"> - <leaflet height="250px" + <leaflet id="{{::mapId}}" + height="250px" center="map.center" markers="map.markers" defaults="map.defaults"> -- GitLab