Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

fix merge conflict

Edward Plato011f2001dcfe
diff --cc web/js/containers/timeline/timeline.js
index e051a57e1,ccc5ab65e..277dd95e5
--- a/web/js/containers/timeline/timeline.js
+++ b/web/js/containers/timeline/timeline.js
@@@ -768,260 -663,217 +768,261 @@@ class Timeline extends React.Component
isAnimationWidgetOpen,
animationDisabled,
hideTimeline,
- timeScale
+ timeScale,
+ isSmallScreen,
+ toggleActiveCompareState,
+ parentOffset,
+ isTourActive
} = this.props;
- let selectedDate = draggerSelected === 'selected' ? this.state.draggerTimeState : this.state.draggerTimeStateB;
- return this.state.initialLoadComplete ? (
- <ErrorBoundary>
- {this.props.isSmallScreen
- ? <MobileDatePicker
- date={selectedDate}
- startDateLimit={timelineStartDateLimit}
- endDateLimit={timelineEndDateLimit}
- hasSubdailyLayers={this.props.hasSubdailyLayers}
- onDateChange={this.onDateChange}
- />
- : <section id="timeline" className="timeline-inner clearfix">
- <div id="timeline-header"
- className={hasSubdailyLayers ? 'subdaily' : ''}
- >
- <div id="date-selector-main">
- <DateSelector
- onDateChange={this.onDateChange}
- date={new Date(selectedDate)}
- hasSubdailyLayers={hasSubdailyLayers}
- draggerSelected={draggerSelected}
- maxDate={new Date(timelineEndDateLimit)}
- minDate={new Date(timelineStartDateLimit)}
- fontSize={24}
- />
- </div>
- <div id="zoom-buttons-group">
- <TimeScaleIntervalChange
- setTimeScaleIntervalChangeUnit={this.setTimeScaleIntervalChangeUnit}
- customIntervalZoomLevel={timeScaleFromNumberKey[customIntervalZoomLevel]}
- customSelected={customSelected}
- customDelta={customIntervalValue}
- timeScaleChangeUnit={timeScaleChangeUnit}
- />
- <DateChangeArrows
- leftArrowDown={this.decrementDate}
- leftArrowUp={this.stopper}
- leftArrowDisabled={leftArrowDisabled}
- rightArrowDown={this.incrementDate}
- rightArrowUp={this.stopper}
- rightArrowDisabled={rightArrowDisabled}
- />
- </div>
- <AnimationButton
- disabled={animationDisabled}
- clickAnimationButton={this.clickAnimationButton}
- />
- </div>
- <div id="timeline-footer"
- style={{
- display:
- this.state.timelineHidden || hideTimeline ? 'none' : 'block'
- }}
- >
- {/* Timeline */}
- <TimelineAxis
- frontDate={this.state.frontDate}
- backDate={this.state.backDate}
- isTimelineDragging={this.state.isTimelineDragging}
- moved={this.state.moved}
- axisWidth={axisWidth}
- dateA={dateA}
- dateB={dateB}
+ let {
+ initialLoadComplete,
+ timelineHidden,
+ draggerTimeState,
+ draggerTimeStateB,
+ draggerPosition,
+ draggerPositionB,
+ draggerVisible,
+ draggerVisibleB,
+ animationStartLocationDate,
+ animationEndLocationDate,
+ animationStartLocation,
+ animationEndLocation,
+ rangeSelectorMax,
+ transformX,
+ position,
+ leftOffset,
+ hoverTime,
+ frontDate,
+ backDate,
+ isTimelineDragging,
+ isDraggerDragging,
+ isAnimationDraggerDragging,
+ customIntervalModalOpen,
+ showHoverLine,
+ showDraggerTime,
+ hoverLinePosition,
+ hasMoved
+ } = this.state;
+ let selectedDate = draggerSelected === 'selected' ? draggerTimeState : draggerTimeStateB;
+ return (
+ <div className="timeline-container">
+ {initialLoadComplete
+ ? <ErrorBoundary>
+ {isSmallScreen
+ ? <MobileDatePicker
+ date={selectedDate}
+ startDateLimit={timelineStartDateLimit}
+ endDateLimit={timelineEndDateLimit}
hasSubdailyLayers={hasSubdailyLayers}
- changeTimeScale={this.changeTimeScale}
- compareModeActive={compareModeActive}
- draggerSelected={draggerSelected}
- onChangeSelectedDragger={this.props.toggleActiveCompareState}
- timelineStartDateLimit={timelineStartDateLimit}
- timelineEndDateLimit={timelineEndDateLimit}
- animStartLocationDate={animStartLocationDate}
- animEndLocationDate={animEndLocationDate}
- isAnimationDraggerDragging={this.state.isAnimationDraggerDragging}
- updateDraggerDatePosition={this.updateDraggerDatePosition}
- draggerTimeState={this.state.draggerTimeState}
- draggerTimeStateB={this.state.draggerTimeStateB}
- // draggerTimeState={dateA}
- // draggerTimeStateB={dateB}
- draggerPosition={this.state.draggerPosition}
- draggerPositionB={this.state.draggerPositionB}
- draggerVisible={this.state.draggerVisible}
- draggerVisibleB={this.state.draggerVisibleB}
- transformX={this.state.transformX}
- updatePositioning={this.updatePositioning}
- position={this.state.position}
- animationStartLocation={this.state.animationStartLocation}
- animationEndLocation={this.state.animationEndLocation}
- timeScale={timeScale}
- showHoverOn={this.showHoverOn}
- showHoverOff={this.showHoverOff}
- showHover={this.showHover}
- leftOffset={this.state.leftOffset}
- hoverTime={this.state.hoverTime}
- isDraggerDragging={this.state.isDraggerDragging}
- parentOffset={this.props.parentOffset}
+ onDateChange={this.onDateChange}
/>
+ : <section id="timeline" className="timeline-inner clearfix">
+ <div id="timeline-header"
+ className={hasSubdailyLayers ? 'subdaily' : ''}
+ >
+ <div id="date-selector-main">
+ <DateSelector
+ onDateChange={this.onDateChange}
+ date={new Date(selectedDate)}
+ hasSubdailyLayers={hasSubdailyLayers}
+ draggerSelected={draggerSelected}
+ maxDate={new Date(timelineEndDateLimit)}
+ minDate={new Date(timelineStartDateLimit)}
+ fontSize={24}
+ />
+ </div>
+ <div id="zoom-buttons-group">
+ <TimeScaleIntervalChange
+ setTimeScaleIntervalChangeUnit={this.setTimeScaleIntervalChangeUnit}
+ customIntervalZoomLevel={timeScaleFromNumberKey[customIntervalZoomLevel]}
+ customSelected={customSelected}
+ customDelta={customIntervalValue}
+ timeScaleChangeUnit={timeScaleChangeUnit}
+ />
+ <DateChangeArrows
+ leftArrowDown={this.throttleDecrementDate}
+ leftArrowUp={this.stopLeftArrow}
+ leftArrowDisabled={leftArrowDisabled}
+ rightArrowDown={this.throttleIncrementDate}
+ rightArrowUp={this.stopRightArrow}
+ rightArrowDisabled={rightArrowDisabled}
+ />
+ </div>
+ <AnimationButton
+ disabled={animationDisabled}
+ clickAnimationButton={this.clickAnimationButton}
+ />
+ </div>
- <HoverLine
- width={axisWidth}
- isTimelineDragging={this.state.isTimelineDragging}
- isAnimationDraggerDragging={this.state.isAnimationDraggerDragging}
- showHoverLine={this.state.showHoverLine}
- hoverLinePosition={this.state.hoverLinePosition}
- />
+ <div id="timeline-footer"
+ style={{
+ display:
+ timelineHidden || hideTimeline ? 'none' : 'block'
+ }}
+ >
+ {/* Axis */}
+ <TimelineAxis
+ isAnimationPlaying={isAnimationPlaying}
+ isTourActive={isTourActive}
+ frontDate={frontDate}
+ backDate={backDate}
+ isTimelineDragging={isTimelineDragging}
+ hasMoved={hasMoved}
+ axisWidth={axisWidth}
+ hasSubdailyLayers={hasSubdailyLayers}
+ changeTimeScale={this.changeTimeScale}
+ isCompareModeActive={isCompareModeActive}
+ draggerSelected={draggerSelected}
+ onChangeSelectedDragger={toggleActiveCompareState}
+ timelineStartDateLimit={timelineStartDateLimit}
+ timelineEndDateLimit={timelineEndDateLimit}
+ animStartLocationDate={animStartLocationDate}
+ animEndLocationDate={animEndLocationDate}
+ isAnimationDraggerDragging={isAnimationDraggerDragging}
+ updateDraggerDatePosition={this.updateDraggerDatePosition}
+ dateA={dateA}
+ dateB={dateB}
+ draggerTimeState={draggerTimeState}
+ draggerTimeStateB={draggerTimeStateB}
+ draggerPosition={draggerPosition}
+ draggerPositionB={draggerPositionB}
+ draggerVisible={draggerVisible}
+ draggerVisibleB={draggerVisibleB}
+ transformX={transformX}
+ updatePositioning={this.updatePositioning}
+ updateTimelineMoveAndDrag={this.updateTimelineMoveAndDrag}
+ updatePositioningOnSimpleDrag={this.updatePositioningOnSimpleDrag}
+ updatePositioningOnAxisStopDrag={this.updatePositioningOnAxisStopDrag}
+ position={position}
+ animationStartLocation={animationStartLocation}
+ animationEndLocation={animationEndLocation}
+ timeScale={timeScale}
+ showHoverOn={this.showHoverOn}
+ showHoverOff={this.showHoverOff}
+ showHover={this.showHover}
+ leftOffset={leftOffset}
+ hoverTime={hoverTime}
+ isDraggerDragging={isDraggerDragging}
+ parentOffset={parentOffset}
+ />
- {isAnimationWidgetOpen && !animationDisabled && this.state.animationStartLocation && this.state.animationStartLocationDate && this.state.animationEndLocation && this.state.animationEndLocationDate
- ? <TimelineRangeSelector
- position={this.state.position}
- frontDate={this.state.frontDate}
- isAnimationDraggerDragging={this.state.isAnimationDraggerDragging}
- timeScale={timeScale}
- startLocation={this.state.animationStartLocation}
- endLocation={this.state.animationEndLocation}
- startLocationDate={this.state.animationStartLocationDate}
- endLocationDate={this.state.animationEndLocationDate}
- timelineStartDateLimit={timelineStartDateLimit}
- timelineEndDateLimit={timelineEndDateLimit}
- updateAnimationDateAndLocation={this.updateAnimationDateAndLocation}
- animationDraggerDateUpdate={this.animationDraggerDateUpdate}
- max={this.state.rangeSelectorMax}
- pinWidth={5}
- width={axisWidth}
- transformX={this.state.transformX}
- rangeOpacity={0.3}
- rangeColor={'#45bdff'}
- startColor={'#40a9db'}
- startTriangleColor={'#fff'}
- endColor={'#295f92'}
- endTriangleColor={'#4b7aab'} />
- : null
- }
-
- {this.state.frontDate
- ? <DraggerContainer
- position={this.state.position}
- timelineStartDateLimit={timelineStartDateLimit}
- timelineEndDateLimit={timelineEndDateLimit}
- timeScale={timeScale}
- frontDate={this.state.frontDate}
- backDate={this.state.backDate}
- draggerSelected={draggerSelected}
- transformX={this.state.transformX}
- width={axisWidth}
- setDraggerVisibility={this.setDraggerVisibility}
- toggleShowDraggerTime={this.toggleShowDraggerTime}
- onChangeSelectedDragger={this.props.toggleActiveCompareState}
- updateDraggerDatePosition={this.updateDraggerDatePosition}
- compareModeActive={compareModeActive}
- // draggerTimeState={dateA}
- // draggerTimeStateB={dateB}
- draggerTimeState={this.state.draggerTimeState}
- draggerTimeStateB={this.state.draggerTimeStateB}
- draggerPosition={this.state.draggerPosition}
- draggerPositionB={this.state.draggerPositionB}
- draggerVisible={this.state.draggerVisible}
- draggerVisibleB={this.state.draggerVisibleB}
- isDraggerDragging={this.state.isDraggerDragging}
- />
- : null }
+ <HoverLine
+ width={axisWidth}
+ isTimelineDragging={isTimelineDragging}
+ isAnimationDraggerDragging={isAnimationDraggerDragging}
+ showHoverLine={showHoverLine}
+ hoverLinePosition={hoverLinePosition}
+ />
- {!this.state.isTimelineDragging
- ? <DateToolTip
- draggerSelected={draggerSelected}
- draggerPosition={this.state.draggerPosition}
- draggerPositionB={this.state.draggerPositionB}
+ {isAnimationWidgetOpen &&
++ !animationDisabled &&
+ this.state.animationStartLocation &&
+ this.state.animationStartLocationDate &&
+ this.state.animationEndLocation &&
+ this.state.animationEndLocationDate
+ ? <TimelineRangeSelector
+ position={position}
+ frontDate={frontDate}
+ isAnimationDraggerDragging={isAnimationDraggerDragging}
+ timeScale={timeScale}
+ startLocation={animationStartLocation}
+ endLocation={animationEndLocation}
+ startLocationDate={animationStartLocationDate}
+ endLocationDate={animationEndLocationDate}
+ timelineStartDateLimit={timelineStartDateLimit}
+ timelineEndDateLimit={timelineEndDateLimit}
+ updateAnimationDateAndLocation={this.updateAnimationDateAndLocation}
+ animationDraggerDateUpdate={this.animationDraggerDateUpdate}
+ max={rangeSelectorMax}
+ pinWidth={5}
+ width={axisWidth}
+ transformX={transformX}
+ rangeOpacity={0.3}
+ rangeColor={'#45bdff'}
+ startColor={'#40a9db'}
+ startTriangleColor={'#fff'}
+ endColor={'#295f92'}
+ endTriangleColor={'#4b7aab'} />
+ : null
+ }
+
+ {frontDate
+ ? <DraggerContainer
+ position={position}
+ timelineStartDateLimit={timelineStartDateLimit}
+ timelineEndDateLimit={timelineEndDateLimit}
+ timeScale={timeScale}
+ frontDate={frontDate}
+ backDate={backDate}
+ draggerSelected={draggerSelected}
+ transformX={transformX}
+ width={axisWidth}
+ setDraggerVisibility={this.setDraggerVisibility}
+ toggleShowDraggerTime={this.toggleShowDraggerTime}
+ onChangeSelectedDragger={toggleActiveCompareState}
+ updateDraggerDatePosition={this.updateDraggerDatePosition}
+ isCompareModeActive={isCompareModeActive}
+ draggerTimeState={draggerTimeState}
+ draggerTimeStateB={draggerTimeStateB}
+ draggerPosition={draggerPosition}
+ draggerPositionB={draggerPositionB}
+ draggerVisible={draggerVisible}
+ draggerVisibleB={draggerVisibleB}
+ isDraggerDragging={isDraggerDragging}
+ />
+ : null }
+
+ {!isTimelineDragging
+ ? <DateToolTip
+ draggerSelected={draggerSelected}
+ draggerPosition={draggerPosition}
+ draggerPositionB={draggerPositionB}
+ hasSubdailyLayers={hasSubdailyLayers}
+ leftOffset={leftOffset}
+ showDraggerTime={showDraggerTime}
+ draggerTimeState={draggerTimeState}
+ draggerTimeStateB={draggerTimeStateB}
+ hoverTime={hoverTime}
+ showHoverLine={showHoverLine}
+ axisWidth={axisWidth}
+ />
+ : null
+ }
+
+ {/* custom interval selector */}
+ <CustomIntervalSelectorWidget
+ customDelta={customIntervalValue}
+ customIntervalZoomLevel={customIntervalZoomLevel}
+ toggleCustomIntervalModal={this.toggleCustomIntervalModal}
+ customIntervalModalOpen={customIntervalModalOpen}
+ changeCustomInterval={this.changeCustomInterval}
+ hasSubdailyLayers={hasSubdailyLayers}
+ />
+ </div>
+
+ {/* Zoom Level Change */}
+ <AxisTimeScaleChange
+ isDraggerDragging={isDraggerDragging}
+ timelineHidden={timelineHidden}
+ timeScale={timeScale}
+ changeTimeScale={this.changeTimeScale}
hasSubdailyLayers={hasSubdailyLayers}
- leftOffset={this.state.leftOffset}
- showDraggerTime={this.state.showDraggerTime}
- draggerTimeState={this.state.draggerTimeState}
- draggerTimeStateB={this.state.draggerTimeStateB}
- hoverTime={this.state.hoverTime}
- showHoverLine={this.state.showHoverLine}
- axisWidth={axisWidth}
/>
- : null
- }
-
- {/* custom interval selector */}
- <CustomIntervalSelectorWidget
- customDelta={customIntervalValue}
- customIntervalZoomLevel={customIntervalZoomLevel}
- toggleCustomIntervalModal={this.toggleCustomIntervalModal}
- customIntervalModalOpen={this.state.customIntervalModalOpen}
- changeCustomInterval={this.changeCustomInterval}
- hasSubdailyLayers={hasSubdailyLayers}
- />
- </div>
-
- {/* Zoom Level Change */}
- <AxisTimeScaleChange
- isDraggerDragging={this.state.isDraggerDragging}
- timelineHidden={this.state.timelineHidden}
- timeScale={this.props.timeScale}
- changeTimeScale={this.changeTimeScale}
- hasSubdailyLayers={this.props.hasSubdailyLayers}
- />
-
- {/* πŸ” Open/Close Chevron πŸ” */}
- <div id="timeline-hide" onClick={this.toggleHideTimeline}>
- <div
- className={`wv-timeline-hide wv-timeline-hide-double-chevron-${
- this.state.timelineHidden ? 'left' : 'right'
- }`}
- />
- </div>
- </section>
- }
- </ErrorBoundary>
- ) : null;
+
+ {/* Open/Close Chevron */}
+ <div id="timeline-hide" onClick={this.toggleHideTimeline}>
+ <div
+ className={`wv-timeline-hide wv-timeline-hide-double-chevron-${
+ timelineHidden ? 'left' : 'right'
+ }`}
+ />
+ </div>
+ </section>
+ }
+ </ErrorBoundary>
+ : null }
+ </div>
+ );
}
}
function mapStateToProps(state) {
@@@ -1133,8 -984,8 +1134,9 @@@
(modal.isOpen && modal.id === 'TOOLBAR_SNAPSHOT') || animation.gifActive,
animationDisabled:
!lodashGet(map, 'ui.selected.frameState_') ||
- sidebar.activeTab === 'download',
+ sidebar.activeTab === 'download' ||
- compare.active
++ compare.active,
+ isAnimationPlaying: animation.isPlaying
};
}
diff --cc web/js/main.js
index 614ed30be,7c8ac2785..f79bb6226
--- a/web/js/main.js
+++ b/web/js/main.js
@@@ -55,7 -55,9 +55,9 @@@ window.onload = () =>
loadingIndicator.delayed(promise, 1000);
promise
.done(config => {
- config.pageLoadTime = new Date();
- config.now = parameters.now
++ config.pageLoadTime = parameters.now
+ ? util.parseDateUTC(parameters.now) || new Date()
+ : new Date();
config.palettes = {
rendered: {},
custom: {}