Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

disable animation in compare mode #1664

Benjamin Kinge6f9828a4e5a
diff --git a/web/js/containers/animation-widget.js b/web/js/containers/animation-widget.js
index eb51dd5b4..2a571ceba 100644
--- a/web/js/containers/animation-widget.js
+++ b/web/js/containers/animation-widget.js
@@ -333,6 +333,7 @@ function mapStateToProps(state) {
browser.greaterThan.small &&
lodashGet(map, 'ui.selected.frameState_') &&
sidebar.activeTab !== 'download' && // No Animation when data download is active
+ !compare.active &&
!(modal.isOpen && modal.id === 'TOOLBAR_SNAPSHOT'), // No Animation when Image download is open
hasSubdailyLayers,
incrementArray: zoomObj.array,
diff --git a/web/js/containers/timeline/timeline.js b/web/js/containers/timeline/timeline.js
index 1940e0318..ccc5ab65e 100644
--- a/web/js/containers/timeline/timeline.js
+++ b/web/js/containers/timeline/timeline.js
@@ -770,7 +770,7 @@ class Timeline extends React.Component {
hoverLinePosition={this.state.hoverLinePosition}
/>
- {isAnimationWidgetOpen && this.state.animationStartLocation && this.state.animationStartLocationDate && this.state.animationEndLocation && this.state.animationEndLocationDate
+ {isAnimationWidgetOpen && !animationDisabled && this.state.animationStartLocation && this.state.animationStartLocationDate && this.state.animationEndLocation && this.state.animationEndLocationDate
? <TimelineRangeSelector
position={this.state.position}
frontDate={this.state.frontDate}
@@ -984,7 +984,8 @@ function mapStateToProps(state) {
(modal.isOpen && modal.id === 'TOOLBAR_SNAPSHOT') || animation.gifActive,
animationDisabled:
!lodashGet(map, 'ui.selected.frameState_') ||
- sidebar.activeTab === 'download'
+ sidebar.activeTab === 'download' ||
+ compare.active
};
}