Interactive interface for browsing global, full-resolution satellite imagery
Sidebar redux cleanup #1623
Benjamin King6990e2c97fb0
diff --git a/web/js/combine-ui.js b/web/js/combine-ui.jsindex 55c0a2e39..dbc0fe7f3 100644--- a/web/js/combine-ui.js+++ b/web/js/combine-ui.js@@ -63,11 +63,6 @@ export function combineUi(models, config, MapMouseEvents, store) {$('input').blur();}});- debugLayers(ui, models, config);- // Reset Worldview when clicking on logo- $(document).click(function(e) {- if (e.target.id === 'wv-logo') resetWorldview(e);- });document.activeElement.blur();$('input').blur();@@ -88,10 +83,3 @@ function registerMapMouseHandlers(maps, events) {});});}-var resetWorldview = function(e) {- e.preventDefault();- if (window.location.search === '') return; // Nothing to reset- var msg =- 'Do you want to reset Worldview to its defaults? You will lose your current state.';- if (confirm(msg)) document.location.href = '/';-};diff --git a/web/js/containers/sidebar/sidebar.js b/web/js/containers/sidebar/sidebar.jsindex decad9ee4..6e127885c 100644--- a/web/js/containers/sidebar/sidebar.js+++ b/web/js/containers/sidebar/sidebar.js@@ -30,6 +30,13 @@ const getActiveTabs = function(config) {events: features.naturalEvents};};+const resetWorldview = function(e) {+ e.preventDefault();+ if (window.location.search === '') return; // Nothing to reset+ var msg =+ 'Do you want to reset Worldview to its defaults? You will lose your current state.';+ if (confirm(msg)) document.location.href = '/';+};class Sidebar extends React.Component {constructor(props) {super(props);@@ -146,6 +153,7 @@ class Sidebar extends React.Component {href="/"title="Click to Reset Worldview to Defaults"id="wv-logo"+ onClick={resetWorldview}ref={iconElement => (this.iconElement = iconElement)}onWheel={wheelCallBack}/>@@ -172,6 +180,7 @@ class Sidebar extends React.Component {onTabClick={onTabClick}tabTypes={tabTypes}toggleSidebar={this.toggleSidebar.bind(this)}+ isCompareMode={isCompareMode}/><TabContent activeTab={activeTab}><TabPane tabId="layers">