Interactive interface for browsing global, full-resolution satellite imagery
Finish main.js modularization
Jo Spragueea8b95c94908
diff --git a/web/js/main.js b/web/js/main.jsindex a5c8c40ff..4df477412 100644--- a/web/js/main.js+++ b/web/js/main.js@@ -1,15 +1,16 @@-// External Dependenciesimport $ from 'jquery';import loEach from 'lodash/each';-// import {GA as googleAnalytics} from 'worldview-components';+import {GA as googleAnalytics} from 'worldview-components';// Utils-import util from './util/util'; // Maybe this is the time to remove the util file from core and put everything from there in the worldview-components util....+import util from './util/util';+// Date-import {parse as dateParser} from './date/date'; // export default function parse!!!+import {parse as dateParser} from './date/date';import {dateModel} from './date/model';import {dateLabel} from './date/label';import dateWheels from './date/wheels';+// Timelineimport {timeline} from './date/timeline';import {timelineData} from './date/timeline-data';@@ -19,12 +20,14 @@ import {timelineTicks} from './date/timeline-ticks';import {timelinePick} from './date/timeline-pick';import {timelinePan} from './date/timeline-pan';import {timelineInput} from './date/timeline-input';+// Layers-import {parse as layerParser, validate as layerValidate} from './layers/layers'; // export parse as layerParser. etc...+import {parse as layerParser, validate as layerValidate} from './layers/layers';import {layersModel} from './layers/model';import {layersModal} from './layers/modal';import {layersSidebar} from './layers/sidebar';import {layersActive} from './layers/active';+// Mapimport {mapParser} from './map/map';import {mapModel} from './map/model';@@ -35,6 +38,7 @@ import {mapLayerBuilder} from './map/layerbuilder';import {mapDatelineBuilder} from './map/datelinebuilder';import {mapPrecacheTile} from './map/precachetile';import {mapAnimate} from './map/animate';+// Animationimport {parse as animationParser} from './animation/anim';import {animationModel} from './animation/model';@@ -42,32 +46,41 @@ import {animationUi} from './animation/ui';import {animationWidget} from './animation/widget';import {animationRangeSelect} from './animation/range-select';import {animationGif} from './animation/gif';+// Palettesimport palettes from './palettes/palettes';import {palettesModel} from './palettes/model';+// Dataimport {dataParser} from './data/data';import {dataModel} from './data/model';import {dataUi} from './data/ui';+// NaturalEventsimport naturalEventsModel from './naturalEvents/model';import naturalEventsUI from './naturalEvents/ui';import naturalEventsRequest from './naturalEvents/request';+// Imageimport {imageRubberband} from './image/rubberband';import {imagePanel} from './image/panel';+// Notificationsimport {notificationsUi} from './notifications/ui';+// UI-import loadingIndicator from './ui/indicator'; // not a class, export object+import loadingIndicator from './ui/indicator';+// Linkimport {linkModel} from './link/model';import {linkUi} from './link/ui';+// Projectionsimport {parse as projectionParser} from './projection/projection';import {projectionModel} from './projection/model';import {projectionUi} from './projection/ui';import {projectionChange} from './projection/change';+// Otherimport {debugConfig, debugLayers, debug} from './debug';import Brand from './brand';@@ -114,7 +127,7 @@ window.onload = () => {config = data;config.parameters = parameters;- // Export for debugging+ // Attach to wvx object for debuggingwvx.config = config;debugConfig(config);@@ -174,7 +187,7 @@ window.onload = () => {}};var ui = {};- // Export for debugging+ // Attach to wvx object for debuggingwvx.models = models;wvx.ui = ui;@@ -195,7 +208,7 @@ window.onload = () => {.register(models.map);models.link.load(state);if (config.features.googleAnalytics) {- // googleAnalytics.init(config.features.googleAnalytics.id); // Insert google tracking+ googleAnalytics.init(config.features.googleAnalytics.id); // Insert google tracking}// HACK: Map needs to be created before the data download modelvar mapComponents = {