Interactive interface for browsing global, full-resolution satellite imagery
pass models to data ui
Benjamin King6d236cc3ae49
diff --git a/web/js/combine-ui.js b/web/js/combine-ui.jsindex 74f13f39d..f8372cd27 100644--- a/web/js/combine-ui.js+++ b/web/js/combine-ui.js@@ -88,25 +88,11 @@ export function combineUi(models, config, MapMouseEvents, store) {ui.dateWheels = dateWheels(models, config);}if (config.features.dataDownload) {- ui.data = dataUi(store, ui, config);+ ui.data = dataUi(models, store, ui, config);}if (config.features.naturalEvents) {- // var request = naturalEventsRequest(models, ui, config);ui.naturalEvents = naturalEventsUI(models, ui, config, store);}- // if (config.features.compare) {- // ui.compare = compareUi(models, ui, config);- // }- // if (config.features.dataDownload) {- // models.data.events.on('queryResults', function() {- // ui.data.onViewChange();- // });- // ui.map.events.on('extent', function() {- // ui.data.onViewChange();- // });- // // FIXME: This is a hack- // models.map.events.on('projection', models.data.updateProjection);- // }registerMapMouseHandlers(ui.map.proj, MapMouseEvents);// Sink all focus on inputs if click unhandled$(document).click(function(event) {diff --git a/web/js/map/data/ui.js b/web/js/map/data/ui.jsindex c726c1775..8eb044228 100644--- a/web/js/map/data/ui.js+++ b/web/js/map/data/ui.js@@ -12,7 +12,7 @@ import * as DATA_CONSTANTS from '../../modules/data/constants';import { CHANGE_TAB as CHANGE_SIDEBAR_TAB } from '../../modules/sidebar/constants';import { toggleGranule } from '../../modules/data/actions';-export function dataUi(store, ui, config, models) {+export function dataUi(models, store, ui, config) {var queryActive = false;var mapController = null;var selectionListPanel = null;diff --git a/web/js/map/natural-events/ui.js b/web/js/map/natural-events/ui.jsindex b77ffecdd..8132162b8 100644--- a/web/js/map/natural-events/ui.js+++ b/web/js/map/natural-events/ui.js@@ -17,7 +17,6 @@ import {} from '../../modules/layers/actions';import { deselectEvent as deselectEventAction } from '../../modules/natural-events/actions';import { CHANGE_PROJECTION } from '../../modules/projection/constants';-import googleTagManager from 'googleTagManager';const zoomLevelReference = {Wildfires: 8,@@ -51,7 +50,6 @@ export default function naturalEventsUI(models, ui, config, store) {requestedEventSources,requestedEventCategories} = state;-switch (action.type) {case CHANGE_SIDEBAR_TAB:return onSidebarChange(action.activeTab);@@ -84,11 +82,8 @@ export default function naturalEventsUI(models, ui, config, store) {};const onSidebarChange = function(tab) {const proj = store.getState().proj;+ console.log(tab);if (tab === 'events') {- googleTagManager.pushEvent({- event: 'natural_events_tab'- });-// Remove previously stored markersnaturalEventMarkers.remove(self.markers);// Store markers so the can be referenced later@@ -225,7 +220,7 @@ export default function naturalEventsUI(models, ui, config, store) {// Display loading information for user feedback on slow networkview = map.getView();-+ console.log('suscribe');store.subscribe(subscribeToStore);};var getZoomPromise = function(