Interactive interface for browsing global, full-resolution satellite imagery
revise mobile dragger left bottom style positioning based on screen width and subdaily layers, add comments
Ed Plato04f54651fb25
diff --git a/web/css/timeline.css b/web/css/timeline.cssindex 6a455184a..61fe4961f 100644--- a/web/css/timeline.css+++ b/web/css/timeline.css@@ -653,8 +653,7 @@ button:focus {/* Mobile date change arrows */.mobile-date-change-arrows-btn {position: absolute;- left: 120px;- bottom: 10px;+ white-space: nowrap;background: rgba(40, 40, 40, 0.85);border: thin solid #333;padding: 3px;diff --git a/web/js/containers/timeline/timeline.js b/web/js/containers/timeline/timeline.jsindex a9b38ebad..50280ba15 100644--- a/web/js/containers/timeline/timeline.js+++ b/web/js/containers/timeline/timeline.js@@ -927,6 +927,8 @@ class Timeline extends React.Component {hideTimeline,timeScale,isSmallScreen,+ isScreenWidthLessThan350,+ isScreenWidthLessThan450,toggleActiveCompareState,parentOffset,isTourActive,@@ -962,13 +964,26 @@ class Timeline extends React.Component {hasMoved} = this.state;const selectedDate = draggerSelected === 'selected' ? draggerTimeState : draggerTimeStateB;+ // timeline open/closed stylingconst isTimelineHidden = timelineHidden || hideTimeline;const chevronDirection = isTimelineHidden ? 'left' : 'right';+ // handle mobile size styling+ const mobileLeft = hasSubdailyLayers+ ? isScreenWidthLessThan450+ ? '10px'+ : '277px'+ : isScreenWidthLessThan350+ ? '10px'+ : '180px';+ const mobileBottom = (hasSubdailyLayers && isScreenWidthLessThan450) || isScreenWidthLessThan350+ ? '65px'+ : '10px';return (<div className="timeline-container">- {initialLoadComplete- ? <ErrorBoundary>+ {initialLoadComplete &&+ <ErrorBoundary>{isSmallScreen+ /* Mobile Timeline Size */? <div id="timeline-header"><div id="date-selector-main"><MobileDatePicker@@ -979,7 +994,12 @@ class Timeline extends React.Component {hasSubdailyLayers={hasSubdailyLayers}/></div>- <div className="mobile-date-change-arrows-btn">+ <div className="mobile-date-change-arrows-btn"+ style={{+ left: mobileLeft,+ bottom: mobileBottom+ }}+ ><div id="zoom-buttons-group"><DateChangeArrowsleftArrowDown={this.throttleDecrementDate}@@ -992,10 +1012,12 @@ class Timeline extends React.Component {</div></div></div>+ /* Normal Timeline Size */: <section id="timeline" className="timeline-inner clearfix"><div id="timeline-header"className={hasSubdailyLayers ? 'subdaily' : ''}>+ {/* Date Selector, Interval, Arrow Controls */}<div id="date-selector-main"><DateSelectorid={draggerSelected}@@ -1029,7 +1051,13 @@ class Timeline extends React.Component {<AnimationButtonclickAnimationButton={this.clickAnimationButton}disabled={animationDisabled}- title={isCompareModeActive ? 'Animation feature is deactivated when Compare feature is active' : isDataDownload ? 'Animation feature is deactivated when Data Download feature is active' : ''}+ title={+ isCompareModeActive+ ? 'Animation feature is deactivated when Compare feature is active'+ : isDataDownload+ ? 'Animation feature is deactivated when Data Download feature is active'+ : ''+ }/></div>@@ -1097,8 +1125,8 @@ class Timeline extends React.Component {this.state.animationStartLocation &&this.state.animationStartLocationDate &&this.state.animationEndLocation &&- this.state.animationEndLocationDate- ? <TimelineRangeSelector+ this.state.animationEndLocationDate &&+ <TimelineRangeSelectoraxisWidth={axisWidth}position={position}transformX={transformX}@@ -1113,11 +1141,10 @@ class Timeline extends React.Component {updateAnimationDateAndLocation={this.updateAnimationDateAndLocation}max={rangeSelectorMax}/>- : null}- {frontDate- ? <DraggerContainer+ {frontDate &&+ <DraggerContaineraxisWidth={axisWidth}position={position}transformX={transformX}@@ -1140,11 +1167,10 @@ class Timeline extends React.Component {isCompareModeActive={isCompareModeActive}isDraggerDragging={isDraggerDragging}isAnimationPlaying={isAnimationPlaying}- />- : null }+ /> }- {!isTimelineDragging- ? <DateToolTip+ {!isTimelineDragging &&+ <DateToolTipaxisWidth={axisWidth}leftOffset={leftOffset}hoverTime={hoverTime}@@ -1157,11 +1183,10 @@ class Timeline extends React.Component {showDraggerTime={showDraggerTime}showHoverLine={showHoverLine}/>- : null}</div>- {/* custom interval selector */}+ {/* Custom Interval Selector Widget */}<CustomIntervalSelectorWidgetcustomDelta={customIntervalValue}customIntervalZoomLevel={customIntervalZoomLevel}@@ -1170,7 +1195,7 @@ class Timeline extends React.Component {hasSubdailyLayers={hasSubdailyLayers}/>- {/* Zoom Level Change */}+ {/* Zoom Level Change Controls */}<AxisTimeScaleChangetimeScale={timeScale}changeTimeScale={this.changeTimeScale}@@ -1188,7 +1213,7 @@ class Timeline extends React.Component {</section>}</ErrorBoundary>- : null }+ }</div>);}@@ -1223,6 +1248,8 @@ function mapStateToProps(state) {const { isCompareA, activeString } = compare;const isCompareModeActive = compare.active;const isSmallScreen = lessThan.medium;+ const isScreenWidthLessThan350 = screenWidth < 350;+ const isScreenWidthLessThan450 = screenWidth < 450;let hasSubdailyLayers = hasSubDaily(layers[compare.activeString]);// handle reset of timescale and intervals if not subdaily@@ -1276,6 +1303,8 @@ function mapStateToProps(state) {appNow,isTourActive: tour.active,isSmallScreen,+ isScreenWidthLessThan350,+ isScreenWidthLessThan450,draggerSelected: isCompareA ? 'selected' : 'selectedB',hasSubdailyLayers,customSelected,@@ -1389,6 +1418,8 @@ Timeline.propTypes = {isCompareModeActive: PropTypes.bool,isDataDownload: PropTypes.bool,isGifActive: PropTypes.bool,+ isScreenWidthLessThan350: PropTypes.bool,+ isScreenWidthLessThan450: PropTypes.bool,isSmallScreen: PropTypes.bool,isTourActive: PropTypes.bool,leftArrowDisabled: PropTypes.bool,