Interactive interface for browsing global, full-resolution satellite imagery
only draw and update track during deselectEvent if natural events is active
Edward Plato6a71665c6058
diff --git a/web/js/map/natural-events/ui.js b/web/js/map/natural-events/ui.jsindex dea47c0e1..92491202d 100644--- a/web/js/map/natural-events/ui.js+++ b/web/js/map/natural-events/ui.js@@ -309,8 +309,11 @@ export default function naturalEventsUI(ui, config, store, models) {self.deselectEvent = function() {self.selected = {};naturalEventMarkers.remove(self.markers);- self.markers = naturalEventMarkers.draw();- naturalEventsTrack.update(null);+ const state = store.getState();+ if (state.events.active) {+ self.markers = naturalEventMarkers.draw();+ naturalEventsTrack.update(null);+ }store.dispatch(deselectEventAction);self.events.trigger('change');};