Interactive interface for browsing global, full-resolution satellite imagery
fix parsing of permalink w/ tour
Benjamin Kingbc450fc0f09f
diff --git a/web/js/components/tour/widget-steps.js b/web/js/components/tour/widget-steps.jsindex 64336880d..849c2f84f 100644--- a/web/js/components/tour/widget-steps.js+++ b/web/js/components/tour/widget-steps.js@@ -5,15 +5,34 @@ class Steps extends React.Component {render() {return (<div className="step-container">- <a href="#" className={'step-previous'} aria-label="Previous" onClick={this.props.decreaseStep}>- <i className="fa fa-arrow-circle-left" aria-hidden="true"></i>+ <a+ href="javascript:void(0);"+ className={'step-previous'}+ aria-label="Previous"+ onClick={this.props.decreaseStep}+ >+ <i className="fa fa-arrow-circle-left" aria-hidden="true" /></a><div className="step-counter">- <p>Step <span className="step-current">{this.props.currentStep}</span>/<span className="step-total">{this.props.totalSteps}</span>+ <p>+ Step <span className="step-current">{this.props.currentStep}</span>/+ <span className="step-total">{this.props.totalSteps}</span></p></div>- <a href="#" className="step-next" aria-label="Next" onClick={this.props.incrementStep}>- <i className={this.props.currentStep === this.props.totalSteps ? 'fa fa-check-circle' : 'fa fa-arrow-circle-right'} aria-hidden="true"></i>+ <a+ href="javascript:void(0);"+ className="step-next"+ aria-label="Next"+ onClick={this.props.incrementStep}+ >+ <i+ className={+ this.props.currentStep === this.props.totalSteps+ ? 'fa fa-check-circle'+ : 'fa fa-arrow-circle-right'+ }+ aria-hidden="true"+ /></a></div>);diff --git a/web/js/containers/tour.js b/web/js/containers/tour.jsindex ad877c7e3..16c688baf 100644--- a/web/js/containers/tour.js+++ b/web/js/containers/tour.js@@ -281,6 +281,7 @@ Tour.propTypes = {};const mapDispatchToProps = dispatch => ({processStepLink: search => {+ search = search.split('/?').pop();const location = update(history.location, {search: { $set: search }});diff --git a/web/js/map/ui.js b/web/js/map/ui.jsindex a5c999305..1954cefdc 100644--- a/web/js/map/ui.js+++ b/web/js/map/ui.js@@ -88,10 +88,16 @@ export function mapui(models, config, store) {case LOCATION_POP_ACTION:const newState = util.fromQueryString(action.payload.search);const extent = lodashGet(action, 'payload.query.legacy.map.extent');- const rotation = lodashGet(action, 'payload.query.legacy.map.rotation') || 0;- updateProjection();+ const rotation =+ lodashGet(action, 'payload.query.legacy.map.rotation') || 0;if (newState.v && !newState.e && extent) {- flyToNewExtent(extent, rotation);+ flyToNewExtent(extent, rotation)+ }+ if (newState.p) {+ updateProjection();+ }+ if (newState.l || newState.l1 || newState.ca) {+ reloadLayers();}return;case layerConstants.REMOVE_LAYER:@@ -163,7 +169,6 @@ export function mapui(models, config, store) {* @returns {void}*/var updateProjection = function(start) {- console.log('update proj')const state = store.getState();const { proj } = state;if (self.selected) {