Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

fix custom interval open/close modal and set defaults if custom values han't been initialized

Edward Platocdbb8b61e179
diff --git a/web/js/containers/animation-widget.js b/web/js/containers/animation-widget.js
index 29006f957..cdd3260fa 100644
--- a/web/js/containers/animation-widget.js
+++ b/web/js/containers/animation-widget.js
@@ -195,7 +195,7 @@ class AnimationWidget extends React.Component {
maxQueueLength={maxLength}
queueLength={queueLength}
layers={layers}
- interval={interval}
+ interval={interval || 'day'}
delta={delta}
speed={this.state.speed}
selectDate={selectDate}
@@ -349,7 +349,7 @@ function mapStateToProps(state) {
looping: loop,
delta: customSelected ? customDelta : delta || 1,
interval: customSelected
- ? timeScaleFromNumberKey[customInterval]
+ ? timeScaleFromNumberKey[customInterval] || 'day'
: timeScaleFromNumberKey[interval] || 'day',
hasCustomPalettes,
map,
@@ -466,7 +466,7 @@ const getZoomObject = function(dateModel, hasSubDaily) {
return {
increment: headerText,
array: [...array],
- customDelta: dateModel.customDelta,
- customInterval: dateModel.customInterval
+ customDelta: dateModel.customDelta || 1,
+ customInterval: dateModel.customInterval || 3
};
};