Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

Add forward and backward buttons to mobile datepicker

Bowei Yao595cdc770476
diff --git a/web/css/timeline.css b/web/css/timeline.css
index 95f6553ca..3097716f1 100644
--- a/web/css/timeline.css
+++ b/web/css/timeline.css
@@ -641,6 +641,18 @@ button:focus {
cursor: pointer;
}
+/* Mobile date change arrows */
+.mobile-date-change-arrows-btn {
+ position: absolute;
+ left: 120px;
+ bottom: 10px;
+ background: rgba(40, 40, 40, 0.85);
+ border: thin solid #333;
+ padding: 3px;
+ border-radius: 5px;
+ cursor: pointer;
+}
+
.datepicker-header,
.datepicker-navbar-btn {
font-weight: 700;
diff --git a/web/js/containers/timeline/timeline.js b/web/js/containers/timeline/timeline.js
index aa5ce229c..63ec9e30c 100644
--- a/web/js/containers/timeline/timeline.js
+++ b/web/js/containers/timeline/timeline.js
@@ -905,13 +905,29 @@ class Timeline extends React.Component {
{initialLoadComplete
? <ErrorBoundary>
{isSmallScreen
- ? <MobileDatePicker
- date={selectedDate}
- startDateLimit={timelineStartDateLimit}
- endDateLimit={timelineEndDateLimit}
- onDateChange={this.onDateChange}
- hasSubdailyLayers={hasSubdailyLayers}
- />
+ ? <div id="timeline-header">
+ <div id="date-selector-main">
+ <MobileDatePicker
+ date={selectedDate}
+ startDateLimit={timelineStartDateLimit}
+ endDateLimit={timelineEndDateLimit}
+ onDateChange={this.onDateChange}
+ hasSubdailyLayers={hasSubdailyLayers}
+ />
+ </div>
+ <div className="mobile-date-change-arrows-btn">
+ <div id="zoom-buttons-group">
+ <DateChangeArrows
+ leftArrowDown={this.throttleDecrementDate}
+ leftArrowUp={this.stopLeftArrow}
+ leftArrowDisabled={leftArrowDisabled}
+ rightArrowDown={this.throttleIncrementDate}
+ rightArrowUp={this.stopRightArrow}
+ rightArrowDisabled={rightArrowDisabled}
+ />
+ </div>
+ </div>
+ </div>
: <section id="timeline" className="timeline-inner clearfix">
<div id="timeline-header"
className={hasSubdailyLayers ? 'subdaily' : ''}