Unselect filter when clicking home button + Go back to world map level when removing filter
authorChloe Laisne <chloe.laisne@gmail.com>
Sun, 25 Sep 2016 14:02:11 +0200
changeset 290 ca990333f838
parent 289 7cae80e5748c
child 291 478cdcc56a63
Unselect filter when clicking home button + Go back to world map level when removing filter
cms/app-client/app/components/visu-carto.js
--- a/cms/app-client/app/components/visu-carto.js	Sun Sep 25 13:45:54 2016 +0200
+++ b/cms/app-client/app/components/visu-carto.js	Sun Sep 25 14:02:11 2016 +0200
@@ -20,7 +20,7 @@
     filter: Ember.inject.service(),
     locationObserver: Ember.observer('filter.location', function() {
         if(!this.get('filter').get('location')) {
-            this.get('map').selectObject();
+            this.sendAction('setLocation', 'world');
         }
     }),
 
@@ -184,7 +184,7 @@
 
     homeButtonClicked: function(event) {
         if(event.chart.dataProvider.map !== 'continentsLow') {
-            this.sendAction('setLocation', 'world');
+            this.get('filter').set('location', null);
         }
     }