Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

Pass currentZoom props to react components & update animation CSS

ZachTRice113bd7717abb
diff --git a/web/css/anim.widget.css b/web/css/anim.widget.css
index 2860d0df9..ce7fb608b 100644
--- a/web/css/anim.widget.css
+++ b/web/css/anim.widget.css
@@ -1,5 +1,5 @@
#wv-animation-widget {
- width: 402px;
+ width: 330px;
border-radius: 8px;
height: 125px;
background: #212121;
@@ -12,6 +12,10 @@
color: #fff;
}
+#wv-animation-widget.subdaily {
+ width: 402px;
+}
+
#wv-animation-widget > a,
#wv-animation-widget > div {
display: inline-block;
diff --git a/web/js/animation/widget.js b/web/js/animation/widget.js
index 48fbddfd9..102dc5454 100644
--- a/web/js/animation/widget.js
+++ b/web/js/animation/widget.js
@@ -44,6 +44,7 @@ export function animationWidget (models, config, ui) {
endDate: new Date(model.rangeState.endDate),
minDate: models.date.minDate(),
maxDate: models.date.maxDate(),
+ currentZoom: models.date.selectedZoom,
onClose: self.toggleAnimationWidget
};
@@ -137,6 +138,7 @@ export function animationWidget (models, config, ui) {
self.reactComponent.setState({
startDate: new Date(state.startDate),
endDate: new Date(state.endDate),
+ currentZoom: models.date.selectedZoom,
playing: state.playing,
increment: self.getIncrements(), // config.currentZoom is a number: 1,2,3
incrementArray: lodashWithout(zooms, self.getIncrements()) // array of zooms without current zoom