Interactive interface for browsing global, full-resolution satellite imagery
Optimize processing link, ui, and actions
ZachTRice4147d90e33e9
diff --git a/config/default/common/config/wv.json/stories/wildfire/camp_fire_november_2018.json b/config/default/common/config/wv.json/stories/wildfire/camp_fire_november_2018.jsonindex 753fed547..e283c5864 100644--- a/config/default/common/config/wv.json/stories/wildfire/camp_fire_november_2018.json+++ b/config/default/common/config/wv.json/stories/wildfire/camp_fire_november_2018.json@@ -33,8 +33,8 @@{"description": "step003.html","transition": {- "element": "animation",- "action": "play"+ "element": "",+ "action": ""},"stepLink": "ca=true&cm=swipe&cv=52&p=geographic&l=MODIS_Aqua_CorrectedReflectance_Bands721,VIIRS_SNPP_CorrectedReflectance_TrueColor(hidden),MODIS_Aqua_CorrectedReflectance_TrueColor(hidden),MODIS_Terra_CorrectedReflectance_TrueColor(hidden),Reference_Labels(hidden),Reference_Features(hidden),Coastlines&l1=MODIS_Terra_CorrectedReflectance_Bands721,VIIRS_SNPP_CorrectedReflectance_TrueColor(hidden),MODIS_Aqua_CorrectedReflectance_TrueColor(hidden),MODIS_Terra_CorrectedReflectance_TrueColor(hidden),Reference_Labels(hidden),Reference_Features(hidden),Coastlines&t=2018-11-07-T00%3A00%3A00Z&z=3&t1=2018-11-16-T00%3A00%3A00Z&v=-123.94652902590362,38.513677597564126,-119.86620676027862,40.565923691314126"}diff --git a/web/js/components/tour/modal-tour-in-progress.js b/web/js/components/tour/modal-tour-in-progress.jsindex 73938c229..2beeb3505 100644--- a/web/js/components/tour/modal-tour-in-progress.js+++ b/web/js/components/tour/modal-tour-in-progress.js@@ -51,11 +51,11 @@ class ModalInProgress extends React.Component {if (models.compare.active === true) {models.compare.toggle();models.compare.load({});+ ui.sidebar.reactComponent.setState({+ isCompareMode: false+ });}- ui.sidebar.reactComponent.setState({- isCompareMode: false- });this.props.toggleMetaLoaded();this.fetchMetadata(currentStory, 0);this.loadLink(currentStory, currentStepIndex);@@ -189,11 +189,9 @@ class ModalInProgress extends React.Component {// Process the state of the application// a timeout is added so that the palette data can load properlysetTimeout(() => { this.processLink(currentState, stepTransition, prevState, currentStepIndex); }, 750);- setTimeout(() => { this.setUI(currentState, prevState, currentStepIndex); }, 950);- setTimeout(() => { this.processActions(currentState, stepTransition); }, 1200);}- processLink(currentState) {+ processLink(currentState, stepTransition, prevState, currentStepIndex) {var errors = [];var models = this.props.models;var ui = this.props.ui;@@ -253,9 +251,11 @@ class ModalInProgress extends React.Component {} else {ui.sidebar.selectTab('layers');}++ this.setUI(currentState, stepTransition, prevState, currentStepIndex);}- setUI(currentState, prevState, currentStepIndex) {+ setUI(currentState, stepTransition, prevState, currentStepIndex) {var models = this.props.models;var ui = this.props.ui;var rotation = 0;@@ -278,7 +278,7 @@ class ModalInProgress extends React.Component {ui.sidebar.reactComponent.setState({isCompareMode: true,firstDateObject: compareObj.a,- secondDateObject: compareObj.b,+ secondDateObject: compareObj.b || null,isCompareA: models.compare && models.compare.isCompareA,comparisonType: currentState.cm});@@ -331,6 +331,8 @@ class ModalInProgress extends React.Component {// Jump to extent & zoom (instead of animate):// ui.map.selected.getView().fit(currentState.v, ui.map.selected.getSize());}++ this.processActions(currentState, stepTransition);}processActions(currentState, stepTransition) {