Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

implementing mobile animation widget updates (#4038)

Ryan Weilerc74dccd71016
diff --git a/web/js/containers/animation-widget.js b/web/js/containers/animation-widget.js
index 18d0e0946..5f4065d1f 100644
--- a/web/js/containers/animation-widget.js
+++ b/web/js/containers/animation-widget.js
@@ -420,60 +420,66 @@ class AnimationWidget extends React.Component {
id="wv-animation-widget"
className={`wv-animation-widget${subDailyMode ? ' subdaily' : ''}`}
>
- <div className="mobile-animation-widget-container">
-
- <div className="mobile-animation-flex-row">
- <span>
- Loop
- </span>
- <LoopButton looping={looping} onLoop={this.onLoop} isMobile={isMobile} />
- </div>
-
- <div className="mobile-animation-flex-row">
- <MobileCustomIntervalSelector
- hasSubdailyLayers={hasSubdailyLayers}
- />
- </div>
+ <div className="mobile-animation-flex-container">
+ <div className="mobile-animation-widget-container">
+
+ <div className="mobile-animation-flex-row">
+ <span>
+ Loop
+ </span>
+ <LoopButton looping={looping} onLoop={this.onLoop} isMobile={isMobile} />
+ </div>
- <div className="mobile-animation-flex-row" id="slider-case-row">
- <div className="wv-slider-case">
- <Slider
- className="input-range"
- step={0.5}
- max={10}
- min={0.5}
- value={speed}
- onChange={(num) => this.setState({ speed: num })}
- handle={RangeHandle}
- onAfterChange={() => { onSlide(speed); }}
- disabled={isPlaying}
+ <div className="mobile-animation-flex-row">
+ <MobileCustomIntervalSelector
+ hasSubdailyLayers={hasSubdailyLayers}
/>
- <span className="wv-slider-label">{sliderLabel}</span>
</div>
- </div>
- <div className="mobile-animation-block-row" id="mobile-animation-start-date">
- <span>Start Date</span>
- <MobileDatePicker
- date={startDate}
- startDateLimit={minimumDate}
- endDateLimit={endingDate}
- onDateChange={this.onMobileDateChangeStart}
- hasSubdailyLayers={hasSubdailyLayers}
- isMobile={isMobile}
- />
- </div>
+ <div className="mobile-animation-flex-row" id="slider-case-row">
+ <div className="wv-slider-case">
+ <Slider
+ className="input-range"
+ step={0.5}
+ max={10}
+ min={0.5}
+ value={speed}
+ onChange={(num) => this.setState({ speed: num })}
+ handle={RangeHandle}
+ onAfterChange={() => { onSlide(speed); }}
+ disabled={isPlaying}
+ />
+ <span className="wv-slider-label">{sliderLabel}</span>
+ </div>
+ </div>
- <div className="mobile-animation-block-row" id="mobile-animation-end-date">
- <span>End Date</span>
- <MobileDatePicker
- date={endDate}
- startDateLimit={startingDate}
- endDateLimit={maximumDate}
- onDateChange={this.onMobileDateChangeEnd}
- hasSubdailyLayers={hasSubdailyLayers}
- isMobile={isMobile}
- />
+ <div className="mobile-animation-flex-row">
+ <div className="mobile-animation-block-row" id="mobile-animation-start-date">
+ <span>Start Date</span>
+ <MobileDatePicker
+ date={startDate}
+ startDateLimit={minimumDate}
+ endDateLimit={endingDate}
+ onDateChange={this.onMobileDateChangeStart}
+ hasSubdailyLayers={hasSubdailyLayers}
+ isMobile={isMobile}
+ />
+ </div>
+ </div>
+
+ <div className="mobile-animation-flex-row">
+ <div className="mobile-animation-block-row" id="mobile-animation-end-date">
+ <span>End Date</span>
+ <MobileDatePicker
+ date={endDate}
+ startDateLimit={startingDate}
+ endDateLimit={maximumDate}
+ onDateChange={this.onMobileDateChangeEnd}
+ hasSubdailyLayers={hasSubdailyLayers}
+ isMobile={isMobile}
+ />
+ </div>
+ </div>
</div>
</div>
</div>
diff --git a/web/scss/features/anim-widget.scss b/web/scss/features/anim-widget.scss
index 5690e45b5..5ef07264e 100644
--- a/web/scss/features/anim-widget.scss
+++ b/web/scss/features/anim-widget.scss
@@ -417,6 +417,7 @@ a .wv-animation-widget-icon {
height: 100%;
box-sizing: border-box;
bottom: 0;
+ background-color: $wv-solid-black;
& .mobile-animation-header {
padding: 0 20px 0 10px;
@@ -483,9 +484,16 @@ a .wv-animation-widget-icon {
margin-top: 10px;
}
+ & .mobile-animation-flex-container {
+ display: flex;
+ justify-content: center;
+ height: 85%;
+ margin: 0;
+ }
+
& .mobile-animation-widget-container {
margin: 0;
- width: 98%;
+ width: 80%;
height: 80%;
display: grid;
grid-template-columns: repeat(2, 1fr);
@@ -495,7 +503,6 @@ a .wv-animation-widget-icon {
#slider-case-row {
grid-column: 1 / -1;
width: 100%;
- margin-top: 1rem;
& .wv-slider-label {
text-align: center;
@@ -516,12 +523,26 @@ a .wv-animation-widget-icon {
& .mobile-animation-block-row {
text-align: center;
font-size: 18px;
+ width: 100%;
& .mobile-date-picker-select-btn {
position: relative;
background-color: $wv-dark-blue;
bottom: -10%;
width: 95%;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+
+ & .mobile-date-picker-select-btn-text {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ }
+
+ & span {
+ font-size: 23px;
+ }
}
}
@@ -557,8 +578,12 @@ a .wv-animation-widget-icon {
#mobile-animation-widget-mobile-phone-landscape {
& .wv-animation-widget {
- & .rc-slider {
- width: 400px;
+ & #slider-case-row {
+ margin-top: 1rem;
+
+ & .rc-slider {
+ width: 400px;
+ }
}
}
}