Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

Merge branch 'develop' of https://github.com/nasa-gibs/worldview into distraction-free-mode

Edward Platobef40e667eb5
diff --cc web/js/containers/sidebar/sidebar.js
index 8722154d7,b9d2bbf7c..2d9728d3a
--- a/web/js/containers/sidebar/sidebar.js
+++ b/web/js/containers/sidebar/sidebar.js
@@@ -196,50 -196,55 +196,54 @@@ class Sidebar extends React.Component
ref={el => {
this.sideBarCase = el;
}}
- style={
- isCollapsed
- ? { maxHeight: '0' }
- : { maxHeight: screenHeight + 'px' }
- }
+ style={{
+ maxHeight: isCollapsed ? '0' : screenHeight + 'px',
+ display: this.props.isDistractionFreeModeActive ? 'none' : 'block'
+ }}
onWheel={wheelCallBack}
>
- <NavCase
- activeTab={activeTab}
- onTabClick={onTabClick}
- tabTypes={tabTypes}
- isMobile={isMobile}
- toggleSidebar={this.toggleSidebar.bind(this)}
- isCompareMode={isCompareMode}
- isDataDisabled={isDataDisabled}
- />
- <TabContent activeTab={activeTab}>
- <TabPane tabId="layers">
- {this.getProductsToRender(activeTab, isCompareMode)}
- </TabPane>
- <TabPane tabId="events">
- {naturalEventsFeatureActive
- ? <Events
- isActive={activeTab === 'events'}
- height={subComponentHeight}
- />
- : null
- }
- </TabPane>
- <TabPane tabId="download">
- {dataDownloadFeatureActive
- ? <Data
- isActive={activeTab === 'download'}
- height={subComponentHeight}
- tabTypes={tabTypes}
- />
- : null
- }
- </TabPane>
- <footer
- ref={footerElement => (this.footerElement = footerElement)}
- >
- <FooterContent tabTypes={tabTypes} activeTab={activeTab} />
- </footer>
- </TabContent>
+ {!isCollapsed && (
+ <>
+ <NavCase
+ activeTab={activeTab}
+ onTabClick={onTabClick}
+ tabTypes={tabTypes}
+ isMobile={isMobile}
+ toggleSidebar={this.toggleSidebar.bind(this)}
+ isCompareMode={isCompareMode}
+ isDataDisabled={isDataDisabled}
+ />
+ <TabContent activeTab={activeTab}>
+ <TabPane tabId="layers">
+ {this.getProductsToRender(activeTab, isCompareMode)}
+ </TabPane>
+ <TabPane tabId="events">
+ {naturalEventsFeatureActive
+ ? <Events
+ isActive={activeTab === 'events'}
+ height={subComponentHeight}
+ />
+ : null
+ }
+ </TabPane>
+ <TabPane tabId="download">
+ {dataDownloadFeatureActive
+ ? <Data
+ isActive={activeTab === 'download'}
+ height={subComponentHeight}
+ tabTypes={tabTypes}
+ />
+ : null
+ }
+ </TabPane>
+ <footer
+ ref={footerElement => (this.footerElement = footerElement)}
+ >
+ <FooterContent tabTypes={tabTypes} activeTab={activeTab} />
+ </footer>
+ </TabContent>
+ </>
+ )}
</div>
</section>
</ErrorBoundary>