equal
deleted
inserted
replaced
86 if(typeof departments === 'undefined') { |
86 if(typeof departments === 'undefined') { |
87 object['mouseEnabled'] = false; |
87 object['mouseEnabled'] = false; |
88 object['color'] = self.get('color'); |
88 object['color'] = self.get('color'); |
89 } else { |
89 } else { |
90 object['value'] = departments.get('count'); |
90 object['value'] = departments.get('count'); |
|
91 object['title'] = area.title + " (" + departments.get('count') + ")"; |
91 } |
92 } |
92 france2016LowAreas.push(object); |
93 france2016LowAreas.push(object); |
93 }); |
94 }); |
94 this.set('franceAreas', france2016LowAreas); |
95 this.set('franceAreas', france2016LowAreas); |
95 }, |
96 }, |
108 } else { |
109 } else { |
109 if(typeof worldLowAreas.find(country => country.id === area.id) === 'undefined') { |
110 if(typeof worldLowAreas.find(country => country.id === area.id) === 'undefined') { |
110 var object = { |
111 var object = { |
111 'id': area.id, |
112 'id': area.id, |
112 'selectable': true, |
113 'selectable': true, |
113 'value': countries.get('count') |
114 'value': countries.get('count'), |
|
115 'title': area.title + " (" + countries.get('count') + ")" |
114 }; |
116 }; |
115 if(area.id === 'FR') { |
117 if(area.id === 'FR') { |
116 object['autoZoom'] = true; |
118 object['autoZoom'] = true; |
117 } |
119 } |
118 worldLowAreas.push(object); |
120 worldLowAreas.push(object); |
137 if(typeof continent === 'undefined') { |
139 if(typeof continent === 'undefined') { |
138 object['mouseEnabled'] = false; |
140 object['mouseEnabled'] = false; |
139 object['color'] = self.get('color'); |
141 object['color'] = self.get('color'); |
140 } else { |
142 } else { |
141 object['value'] = continent.get('count'); |
143 object['value'] = continent.get('count'); |
|
144 object['title'] = area.title + " (" + continent.get('count') + ")"; |
142 } |
145 } |
143 continentsLowAreas.push(object); |
146 continentsLowAreas.push(object); |
144 }); |
147 }); |
145 this.set('continentsAreas', continentsLowAreas); |
148 this.set('continentsAreas', continentsLowAreas); |
146 }, |
149 }, |
189 }, |
192 }, |
190 |
193 |
191 clickMapObject: function(event) { |
194 clickMapObject: function(event) { |
192 this.set('locationQueryParam', event.mapObject.id); |
195 this.set('locationQueryParam', event.mapObject.id); |
193 this.sendAction('setLocation', event.mapObject.id); |
196 this.sendAction('setLocation', event.mapObject.id); |
194 this.get('filter').set('location', event.mapObject.title); |
197 this.get('filter').set('location', event.mapObject.id); |
195 }, |
198 }, |
196 |
199 |
197 homeButtonClicked: function(event) { |
200 homeButtonClicked: function(event) { |
198 if(event.chart.dataProvider.map !== 'continentsLow') { |
201 if(event.chart.dataProvider.map !== 'continentsLow') { |
199 this.get('filter').set('location', null); |
202 this.get('filter').set('location', null); |