Interactive interface for browsing global, full-resolution satellite imagery
Fix layerlist visible in modal IE bug #577
Benjamin Kingdae64268c10e
diff --git a/web/css/sidebar.css b/web/css/sidebar.cssindex 2514a5851..95eb35488 100644--- a/web/css/sidebar.css+++ b/web/css/sidebar.css@@ -83,6 +83,13 @@border-color: #00457b;color: #fff;}++/** IE Scrollbar hack */+#productsHolder.layer-modal-open .simplebar-scroll-content,+#productsHolder.layer-modal-open .simplebar-content {+ overflow: hidden;+}+#productsHolder footer {padding: 5px;width: initial;diff --git a/web/index.html b/web/index.htmlindex 759a60bf6..e6603ff78 100644--- a/web/index.html+++ b/web/index.html@@ -48,8 +48,6 @@ Licensed under the NASA Open Source Agreement, Version 1.3 (http://opensource.gs<body><div data-role="page" id="app"></div>- <section id="layer-modal" class="layer-modal">- </section><div id="wv-tour-content" class="tour-content"></div><div id="wv-image-top" class="wv-image-coords"></div><div id="wv-image-right" class="wv-image-coords"></div>diff --git a/web/js/app.js b/web/js/app.jsindex 12ff741e4..4d3ade8f2 100644--- a/web/js/app.js+++ b/web/js/app.js@@ -175,6 +175,7 @@ class App extends React.Component {/></ul><section id="wv-sidebar" />+ <div id="layer-modal" className="layer-modal" /><div id="wv-map" className="wv-map" /><div id="eventsHolder" /><div id="imagedownload" />diff --git a/web/js/components/layer/product-picker.js b/web/js/components/layer/product-picker.jsindex 7da2c920a..10eaca272 100644--- a/web/js/components/layer/product-picker.js+++ b/web/js/components/layer/product-picker.js@@ -42,9 +42,11 @@ class ProductPicker extends React.Component {* @function toggle*/toggle() {+ const val = !this.state.isOpen;this.setState({- isOpen: !this.state.isOpen+ isOpen: val});+ this.props.onToggleModal(val);}/*** Either filter layers with search object ordiff --git a/web/js/components/sidebar/sidebar.js b/web/js/components/sidebar/sidebar.jsindex 4ce93bc13..fcd46b899 100644--- a/web/js/components/sidebar/sidebar.js+++ b/web/js/components/sidebar/sidebar.js@@ -41,7 +41,8 @@ class Sidebar extends React.Component {dataDownloadObject: {},selectedDataProduct: props.selectedDataProduct,showDataUnavailableReason: props.showDataUnavailableReason,- projection: props.projection+ projection: props.projection,+ modalOpen: false};}componentDidMount() {@@ -91,7 +92,7 @@ class Sidebar extends React.Component {toggleSidebar() {var isNowCollapsed = !this.state.isCollapsed;googleTagManager.pushEvent({- 'event': 'sidebar_chevron'+ event: 'sidebar_chevron'});if (this.props.localStorage) {let storageValue = isNowCollapsed ? 'collapsed' : 'expanded';@@ -161,6 +162,7 @@ class Sidebar extends React.Component {onGetData,windowHeight,filterEventList,+ modalOpen,projection} = this.state;const {@@ -216,6 +218,11 @@ class Sidebar extends React.Component {/><divid="productsHolder"+ className={+ modalOpen+ ? 'layer-modal-open products-holder-case'+ : 'products-holder-case'+ }style={isCollapsed? { maxHeight: '0' }diff --git a/web/js/layers/modal.js b/web/js/layers/modal.jsindex f659678d9..72e534583 100644--- a/web/js/layers/modal.js+++ b/web/js/layers/modal.js@@ -61,7 +61,10 @@ export function layersModal(models, ui, config) {layerConfig: config.layers,categoryConfig: config.categories,width: modalWidth,- height: modalHeight+ height: modalHeight,+ onToggleModal: boo => {+ model.events.trigger('modal', boo);+ }};};var getLayersForProjection = function(projection) {@@ -174,6 +177,7 @@ export function layersModal(models, ui, config) {isOpen: true,selectedProjection: models.proj.selected.id});+ model.events.trigger('modal', true);};self.isOpen = function() {return self.reactList.state.isOpen;diff --git a/web/js/sidebar/ui.js b/web/js/sidebar/ui.jsindex 323d494b3..d10354eb9 100644--- a/web/js/sidebar/ui.js+++ b/web/js/sidebar/ui.js@@ -57,6 +57,11 @@ export function sidebarUi(models, config, ui) {models.layers.events.on('add', layerAdd).on('remove', updateLayers)+ .on('modal', val => {+ self.reactComponent.setState({+ modalOpen: val+ });+ }).on('update', updateLayers);ui.tour.events.on('reset', () => {@@ -64,6 +69,7 @@ export function sidebarUi(models, config, ui) {updateData();updateState('isCompareMode');});+models.palettes.events.on('set-custom', updateLayers).on('clear-custom', updateLayers)@@ -356,7 +362,7 @@ export function sidebarUi(models, config, ui) {break;case 'info':googleTagManager.pushEvent({- 'event': 'sidebar_layer_info'+ event: 'sidebar_layer_info'});let $infoDialog = $('#wv-layers-info-dialog');if (@@ -372,7 +378,7 @@ export function sidebarUi(models, config, ui) {break;case 'options':googleTagManager.pushEvent({- 'event': 'sidebar_layer_options'+ event: 'sidebar_layer_options'});let $optionDialog = $('#wv-layers-options-dialog');if (