Interactive interface for browsing global, full-resolution satellite imagery
fix direct navigation issue with natural event list creation
Ed Plato3c69da3ebeda
diff --git a/web/js/natural-events/ui.js b/web/js/natural-events/ui.jsindex 5c4b9bd7c..9ab44f875 100644--- a/web/js/natural-events/ui.js+++ b/web/js/natural-events/ui.js@@ -38,11 +38,7 @@ export default function naturalEventsUI (models, ui, config, request) {request.events.on('queryResults', function () {if (!(model.data.events || model.data.sources)) return;- createEventList();- var isZoomed = Math.floor(view.getZoom()) >= 3;- if (isZoomed || models.proj.selected.id !== 'geographic') {- self.filterEventList();- }+if (model.active) {// Remove previously stored markersnaturalEventMarkers.remove(self.markers);@@ -50,6 +46,12 @@ export default function naturalEventsUI (models, ui, config, request) {self.markers = naturalEventMarkers.draw();}+ createEventList();+ var isZoomed = Math.floor(view.getZoom()) >= 3;+ if (isZoomed || models.proj.selected.id !== 'geographic') {+ self.filterEventList();+ }+map.on('moveend', function (e) {var isZoomed = Math.floor(view.getZoom()) >= 3;if (isZoomed || models.proj.selected.id !== 'geographic') {