Interactive interface for browsing global, full-resolution satellite imagery
WV-2145: Mobile Animation Feature (#3993)
Ryan Weilera0bbed27ecd0
diff --git a/e2e/features/animation/mobile-animation-test.js b/e2e/features/animation/mobile-animation-test.jsnew file mode 100644index 000000000..6eccde124--- /dev/null+++ b/e2e/features/animation/mobile-animation-test.js@@ -0,0 +1,44 @@+const localQueryStrings = require('../../reuseables/querystrings.js');++const TIME_LIMIT = 10000;++module.exports = {+ before: (c) => {+ c.url(c.globals.url + localQueryStrings.knownDate);+ c.pause(1000);+ c.setWindowSize(375, 667);+ c.pause(1000);+ },++ 'Mobile animate button opens widget': (c) => {+ c.waitForElementVisible('.mobile-animate-button', TIME_LIMIT);+ c.useCss().click('.mobile-animate-button');+ c.pause(500);+ c.waitForElementPresent('#wv-animation-widget', TIME_LIMIT);+ c.expect.element('.custom-interval-delta-input').to.have.value.that.equals('1');+ c.expect.element('.dropdown-toggle').text.to.equal('DAY');+ },++ 'Minimizing mobile animation widget opens collapsed animation widget': (c) => {+ c.useCss().click('.wv-minimize');+ c.waitForElementVisible('#collapsed-animate-widget-phone-portrait', TIME_LIMIT);+ },++ 'Playing the animation changes the date of the mobile date picker': (c) => {+ c.useCss().click('#collapsed-animate-widget-phone-portrait');+ c.pause(3000);+ c.expect.element('.mobile-date-picker-select-btn-text span').text.to.equal('2019 AUG 01');+ },++ 'Pressing the animation button brings up the mobile animation widget with the same information': (c) => {+ c.useCss().click('.mobile-animate-button');+ c.pause(500);+ c.waitForElementVisible('#wv-animation-widget', TIME_LIMIT);+ c.expect.element('#mobile-animation-start-date .mobile-date-picker-select-btn span').text.to.equal('2019 JUL 22');+ c.expect.element('#mobile-animation-end-date .mobile-date-picker-select-btn span').text.to.equal('2019 AUG 01');+ },++ after(c) {+ c.end();+ },+};diff --git a/e2e/reuseables/selectors.js b/e2e/reuseables/selectors.jsindex ad502318d..53557520b 100644--- a/e2e/reuseables/selectors.js+++ b/e2e/reuseables/selectors.js@@ -30,6 +30,10 @@ module.exports = {animationIntervalSelector: '#wv-animation-widget #current-interval',animationFrameSlider: '#wv-animation-widget .rc-slider',+ // mobile animations+ mobileAnimateButton: '#animate-button',+ mobileAnimationWidget: '.wv-animation-widget-wrapper-mobile',+// sidebar, layerssidebarContainer: '#products-holder',infoButton: '.wv-layers-info',diff --git a/web/js/app.js b/web/js/app.jsindex 94b5861a6..a772f778d 100644--- a/web/js/app.js+++ b/web/js/app.js@@ -153,7 +153,7 @@ class App extends React.Component {<div id="eventsHolder" /><div id="imagedownload" /><Timeline />- <div id="wv-animation-widget-case">+ <div>{isAnimationWidgetActive ? <AnimationWidget key={locationKey || '2'} /> : null}</div><MeasureButton />diff --git a/web/js/components/animation-widget/loop-button.js b/web/js/components/animation-widget/loop-button.jsindex 76d29ddf7..f6ce786a3 100644--- a/web/js/components/animation-widget/loop-button.js+++ b/web/js/components/animation-widget/loop-button.js@@ -8,7 +8,7 @@ import { UncontrolledTooltip } from 'reactstrap';* @class LoopButton* @extends React.Component*/-const LoopButton = ({ looping, onLoop }) => {+const LoopButton = ({ looping, onLoop, isMobile }) => {const labelText = looping ? 'Disable animation loop' : 'Enable animation loop';const buttonId = 'loop-button';return (@@ -22,12 +22,15 @@ const LoopButton = ({ looping, onLoop }) => {}onClick={onLoop}>- <UncontrolledTooltip- placement="top"- target={buttonId}- >- {labelText}- </UncontrolledTooltip>+ {isMobile ? null+ : (+ <UncontrolledTooltip+ placement="top"+ target={buttonId}+ >+ {labelText}+ </UncontrolledTooltip>+ )}<FontAwesomeIcon icon="retweet" className="wv-animation-widget-icon" /></a>);@@ -36,6 +39,7 @@ const LoopButton = ({ looping, onLoop }) => {LoopButton.propTypes = {looping: PropTypes.bool,onLoop: PropTypes.func,+ isMobile: PropTypes.bool,};export default LoopButton;diff --git a/web/js/components/animation-widget/play-queue.js b/web/js/components/animation-widget/play-queue.jsindex b3e148c46..d9902d23c 100644--- a/web/js/components/animation-widget/play-queue.js+++ b/web/js/components/animation-widget/play-queue.js@@ -172,7 +172,6 @@ class PlayQueue extends React.Component {}const totalLoadTime = ((avgFetchTime * numberOfFrames) / msPerSec / CONCURRENT_REQUESTS).toFixed(2);- console.log(this.fetchTimes);console.debug('Total frames: ', numberOfFrames);console.debug('Avg fetch time: ', (avgFetchTime / msPerSec).toFixed(2));console.debug('Play time (t/r): ', (totalPlayTime / msPerSec).toFixed(2), (remainingPlayTime / msPerSec).toFixed(2));diff --git a/web/js/components/timeline/custom-interval-selector/interval-select.js b/web/js/components/timeline/custom-interval-selector/interval-select.jsindex 17f8c6477..83b51375d 100644--- a/web/js/components/timeline/custom-interval-selector/interval-select.js+++ b/web/js/components/timeline/custom-interval-selector/interval-select.js@@ -1,5 +1,11 @@-import React, { PureComponent } from 'react';+import React, { useState } from 'react';import PropTypes from 'prop-types';+import {+ Dropdown, DropdownToggle, DropdownMenu, DropdownItem,+} from 'reactstrap';+import {+ TIME_SCALE_FROM_NUMBER,+} from '../../../modules/date/constants';/** TimeScaleSelect for Custom Interval Selector@@ -7,53 +13,107 @@ import PropTypes from 'prop-types';** @class TimeScaleSelect*/-class IntervalSelect extends PureComponent {- handleChangeZoomLevel = (e) => {- const { changeZoomLevel } = this.props;+const IntervalSelect = (props) => {+ const {+ zoomLevel,+ hasSubdailyLayers,+ isMobile,+ changeZoomLevel,+ interval,+ } = props;++ const [dropdownOpen, setDropdownOpen] = useState(false);++ const toggle = () => setDropdownOpen((prevState) => !prevState);++ const handleChangeZoomLevel = (e) => {const zoomLevel = e.target.value;changeZoomLevel(zoomLevel);- }+ };- handleSubmit = (e) => {+ const handleChangeZoomLevelMobile = (increment) => {+ changeZoomLevel(increment);+ };++ const handleSubmit = (e) => {e.preventDefault();- }-- render() {- const {- zoomLevel,- hasSubdailyLayers,- } = this.props;- return (- <form- className="custom-interval-timescale-select-form-container no-drag"- onSubmit={this.handleSubmit}- >- <select- className="custom-interval-timescale-select no-drag"- value={zoomLevel}- onChange={this.handleChangeZoomLevel}+ };++ return (+ <>+ {isMobile ? (+ <div className="mobile-timescale-dropdown">+ <Dropdown isOpen={dropdownOpen} toggle={toggle}>+ <DropdownToggle caret>+ {TIME_SCALE_FROM_NUMBER[interval].toUpperCase()}+ </DropdownToggle>+ <DropdownMenu>+ <DropdownItem>+ <span onClick={() => handleChangeZoomLevelMobile('year')}>+ Year+ </span>+ </DropdownItem>+ <DropdownItem>+ <span onClick={() => handleChangeZoomLevelMobile('month')}>+ Month+ </span>+ </DropdownItem>+ <DropdownItem>+ <span onClick={() => handleChangeZoomLevelMobile('day')}>+ Day+ </span>+ </DropdownItem>+ {hasSubdailyLayers ? (+ <>+ <DropdownItem>+ <span onClick={() => handleChangeZoomLevelMobile('hour')}>+ Hour+ </span>+ </DropdownItem>+ <DropdownItem>+ <span onClick={() => handleChangeZoomLevelMobile('minute')}>+ Minute+ </span>+ </DropdownItem>+ </>+ ) : null}+ </DropdownMenu>+ </Dropdown>+ </div>+ ) : (+ <form+ className="custom-interval-timescale-select-form-container no-drag"+ onSubmit={handleSubmit}>- <option className="custom-interval-timescale-select-option no-drag" value="year">year</option>- <option className="custom-interval-timescale-select-option no-drag" value="month">month</option>- <option className="custom-interval-timescale-select-option no-drag" value="day">day</option>- {hasSubdailyLayers- ? (- <>- <option className="custom-interval-timescale-select-option no-drag" value="hour">hour</option>- <option className="custom-interval-timescale-select-option no-drag" value="minute">minute</option>- </>- )- : null}- </select>- </form>- );- }-}+ <select+ className="custom-interval-timescale-select no-drag"+ value={zoomLevel}+ onChange={handleChangeZoomLevel}+ >+ <option className="custom-interval-timescale-select-option no-drag" value="year">year</option>+ <option className="custom-interval-timescale-select-option no-drag" value="month">month</option>+ <option className="custom-interval-timescale-select-option no-drag" value="day">day</option>+ {hasSubdailyLayers+ ? (+ <>+ <option className="custom-interval-timescale-select-option no-drag" value="hour">hour</option>+ <option className="custom-interval-timescale-select-option no-drag" value="minute">minute</option>+ </>+ )+ : null}+ </select>+ </form>+ )}+ </>+ );+};IntervalSelect.propTypes = {changeZoomLevel: PropTypes.func,hasSubdailyLayers: PropTypes.bool,zoomLevel: PropTypes.string,+ isMobile: PropTypes.bool,+ interval: PropTypes.number,};export default IntervalSelect;diff --git a/web/js/components/timeline/custom-interval-selector/mobile-custom-interval-selector.js b/web/js/components/timeline/custom-interval-selector/mobile-custom-interval-selector.jsnew file mode 100644index 000000000..042f4d3a9--- /dev/null+++ b/web/js/components/timeline/custom-interval-selector/mobile-custom-interval-selector.js@@ -0,0 +1,89 @@+import React from 'react';+import PropTypes from 'prop-types';+import { connect } from 'react-redux';+import DeltaInput from './delta-input';+import IntervalSelect from './interval-select';+import {+ TIME_SCALE_FROM_NUMBER,+ TIME_SCALE_TO_NUMBER,+} from '../../../modules/date/constants';+import {+ selectInterval as selectIntervalAction,+ changeCustomInterval as changeCustomIntervalAction,+} from '../../../modules/date/actions';++const MobileCustomIntervalSelector = (props) => {+ const {+ changeCustomInterval,+ customInterval,+ hasSubdailyLayers,+ customDelta,+ isMobile,+ } = props;++ const changeDelta = (value) => {+ if (value >= 0 && value <= 1000) {+ changeCustomInterval(value, customInterval);+ }+ };++ const changeZoomLevel = (zoomLevel) => {+ changeCustomInterval(customDelta, TIME_SCALE_TO_NUMBER[zoomLevel]);+ };++ return (+ <div className="custom-animation-interval-container">+ <h3 className="custom-animation-interval-header">Interval Selector</h3>+ <div className="custom-interval-widget-controls-container">+ <DeltaInput+ deltaValue={customDelta}+ changeDelta={changeDelta}+ isMobile={isMobile}+ />+ <IntervalSelect+ hasSubdailyLayers={hasSubdailyLayers}+ zoomLevel={TIME_SCALE_FROM_NUMBER[customInterval]}+ changeZoomLevel={changeZoomLevel}+ interval={customInterval}+ isMobile={isMobile}+ />+ </div>+ </div>+ );+};++const mapDispatchToProps = (dispatch) => ({+ changeCustomInterval: (delta, timeScale) => {+ dispatch(changeCustomIntervalAction(delta, timeScale));+ },+ selectInterval: (delta, timeScale, customSelected) => {+ dispatch(selectIntervalAction(delta, timeScale, customSelected));+ },+});++const mapStateToProps = (state) => {+ const { date, screenSize } = state;+ const {+ interval, customInterval, customDelta, customSelected,+ } = date;+ return {+ customDelta: customDelta || 1,+ customInterval: customInterval || interval,+ customSelected,+ interval,+ isMobile: screenSize.isMobileDevice,+ };+};++export default connect(+ mapStateToProps,+ mapDispatchToProps,+)(MobileCustomIntervalSelector);++MobileCustomIntervalSelector.propTypes = {+ changeCustomInterval: PropTypes.func,+ customDelta: PropTypes.number,+ customInterval: PropTypes.number,+ hasSubdailyLayers: PropTypes.bool,+ isMobile: PropTypes.bool,+};diff --git a/web/js/components/timeline/timeline-controls/animation-button.js b/web/js/components/timeline/timeline-controls/animation-button.jsindex 64cc2e98e..eeb806392 100644--- a/web/js/components/timeline/timeline-controls/animation-button.js+++ b/web/js/components/timeline/timeline-controls/animation-button.js@@ -1,38 +1,75 @@-import React, { PureComponent } from 'react';+import React from 'react';import PropTypes from 'prop-types';import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';import { UncontrolledTooltip } from 'reactstrap';-class AnimationButton extends PureComponent {- render() {- const className = 'button-action-group animate-button';- const { disabled, label, clickAnimationButton } = this.props;- const buttonId = 'animate-button';- const labelText = label || 'Set up animation';- return (- <div- onClick={clickAnimationButton}- className={disabled ? `wv-disabled-button ${className}` : className}- aria-label={labelText}- >- <div id={buttonId}>- <UncontrolledTooltip- placement="top"- target={buttonId}- >- {labelText}- </UncontrolledTooltip>- <FontAwesomeIcon icon="video" className="wv-animate" size="2x" />- </div>+const AnimationButton = (props) => {+ const {+ disabled,+ label,+ clickAnimationButton,+ breakpoints,+ screenWidth,+ isLandscape,+ isPortrait,+ isMobilePhone,+ isMobileTablet,+ isMobile,+ hasSubdailyLayers,+ } = props;++ const subdailyID = hasSubdailyLayers ? '-subdaily' : '';+ const buttonId = 'animate-button';+ const labelText = label || 'Set up animation';++ const getButtonClassName = () => {+ if ((isMobilePhone && isPortrait) || (!isMobileTablet && screenWidth < 670 && hasSubdailyLayers) || (!isMobileTablet && screenWidth < 575 && !hasSubdailyLayers)) {+ return `phone-portrait${subdailyID}`;+ } if (isMobilePhone && isLandscape) {+ return `phone-landscape${subdailyID}`;+ } if ((isMobileTablet && isPortrait) || (!isMobilePhone && screenWidth < breakpoints.small)) {+ return `tablet-portrait${subdailyID}`;+ } if (isMobileTablet && isLandscape) {+ return `tablet-landscape${subdailyID}`;+ }+ };++ const buttonClass = getButtonClassName();++ return (+ <div+ onClick={clickAnimationButton}+ className={disabled ? 'wv-disabled-button button-action-group animate-button' : !isMobile ? 'button-action-group animate-button' : `button-action-group mobile-animate-button animate-button-${buttonClass}`}+ aria-label={labelText}+ >+ <div id={buttonId}>+ {isMobile ? null+ : (+ <UncontrolledTooltip+ placement="top"+ target={buttonId}+ >+ {labelText}+ </UncontrolledTooltip>+ )}+ <FontAwesomeIcon icon="video" className="wv-animate" size="2x" /></div>- );- }-}+ </div>+ );+};AnimationButton.propTypes = {+ breakpoints: PropTypes.object,clickAnimationButton: PropTypes.func,disabled: PropTypes.bool,label: PropTypes.string,+ screenWidth: PropTypes.number,+ isLandscape: PropTypes.bool,+ isPortrait: PropTypes.bool,+ isMobilePhone: PropTypes.bool,+ isMobileTablet: PropTypes.bool,+ isMobile: PropTypes.bool,+ hasSubdailyLayers: PropTypes.bool,};-export default AnimationButton;+export default React.memo(AnimationButton);diff --git a/web/js/containers/animation-widget.js b/web/js/containers/animation-widget.jsindex a9dfe7e8b..18d0e0946 100644--- a/web/js/containers/animation-widget.js+++ b/web/js/containers/animation-widget.js@@ -1,13 +1,14 @@import React from 'react';import { connect } from 'react-redux';import {+ debounce as lodashDebounce,get as lodashGet,} from 'lodash';import PropTypes from 'prop-types';import Slider, { Handle } from 'rc-slider';import Draggable from 'react-draggable';import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';-+import { getISODateFormatted } from '../components/timeline/date-util';import util from '../util/util';import ErrorBoundary from './error-boundary';import DateRangeSelector from '../components/date-selector/date-range-selector';@@ -15,6 +16,8 @@ import LoopButton from '../components/animation-widget/loop-button';import PlayButton from '../components/animation-widget/play-button';import TimeScaleIntervalChange from '../components/timeline/timeline-controls/timescale-interval-change';import CustomIntervalSelector from '../components/timeline/custom-interval-selector/custom-interval-selector';+import MobileCustomIntervalSelector from '../components/timeline/custom-interval-selector/mobile-custom-interval-selector';+import MobileDatePicker from '../components/timeline/mobile-date-picker';import PlayQueue from '../components/animation-widget/play-queue';import { promiseImageryForTime } from '../modules/map/util';import {@@ -46,6 +49,7 @@ import {changeStartDate,changeEndDate,changeStartAndEndDate,+ toggleAnimationCollapse,} from '../modules/animation/actions';import GifButton from '../components/animation-widget/gif-button';@@ -77,6 +81,7 @@ const RangeHandle = (props) => {const widgetWidth = 334;const subdailyWidgetWidth = 460;const maxFrames = 300;+const mobileMaxFrames = 50;class AnimationWidget extends React.Component {constructor(props) {@@ -88,10 +93,11 @@ class AnimationWidget extends React.Component {x: (props.screenWidth / 2) - halfWidgetWidth,y: -25,},- collapsed: false,collapsedWidgetPosition: { x: 0, y: 0 },userHasMovedWidget: false,};+ this.debounceDateUpdate = lodashDebounce(selectDate, 8);+this.onDateChange = this.onDateChange.bind(this);this.onIntervalSelect = this.onIntervalSelect.bind(this);this.onLoop = this.onLoop.bind(this);@@ -102,10 +108,11 @@ class AnimationWidget extends React.Component {}componentDidMount() {- const { isEmbedModeActive } = this.props;+ const {+ isEmbedModeActive,+ } = this.props;if (isEmbedModeActive) {this.setState({- collapsed: true,widgetPosition: {x: 10,y: 0,@@ -142,9 +149,8 @@ class AnimationWidget extends React.Component {}toggleCollapse() {- this.setState((prevState) => ({- collapsed: !prevState.collapsed,- }));+ const { onToggleAnimationCollapse } = this.props;+ onToggleAnimationCollapse();}/**@@ -200,25 +206,39 @@ class AnimationWidget extends React.Component {}}- onIntervalSelect(timeScale, openModal) {- let delta;- const { onIntervalSelect, customInterval, customDelta } = this.props;- const customSelected = timeScale === 'custom';+ onMobileDateChangeStart = (date) => {+ const { onUpdateStartDate } = this.props;+ const dateObj = new Date(date);+ this.debounceDateUpdate(dateObj);+ onUpdateStartDate(dateObj);+ }- if (openModal) {- this.toggleCustomIntervalModal(openModal);- return;+ onMobileDateChangeEnd = (date) => {+ const { onUpdateEndDate } = this.props;+ const dateObj = new Date(date);+ this.debounceDateUpdate(dateObj);+ onUpdateEndDate(dateObj);}- if (customSelected && customInterval && customDelta) {- timeScale = customInterval;- delta = customDelta;- } else {- timeScale = Number(TIME_SCALE_TO_NUMBER[timeScale]);- delta = 1;+ onIntervalSelect(timeScale, openModal) {+ let delta;+ const { onIntervalSelect, customInterval, customDelta } = this.props;+ const customSelected = timeScale === 'custom';++ if (openModal) {+ this.toggleCustomIntervalModal(openModal);+ return;+ }++ if (customSelected && customInterval && customDelta) {+ timeScale = customInterval;+ delta = customDelta;+ } else {+ timeScale = Number(TIME_SCALE_TO_NUMBER[timeScale]);+ delta = 1;+ }+ onIntervalSelect(delta, timeScale, customSelected);}- onIntervalSelect(delta, timeScale, customSelected);- }onPushPlay = () => {const {@@ -278,12 +298,17 @@ class AnimationWidget extends React.Component {renderCollapsedWidget() {const {hasSubdailyLayers,- isLandscape,isMobile,isPlaying,onClose,onPushPause,playDisabled,+ isPortrait,+ isLandscape,+ isMobilePhone,+ isMobileTablet,+ screenWidth,+ breakpoints,} = this.props;const { collapsedWidgetPosition } = this.state;const cancelSelector = '.no-drag, svg';@@ -292,6 +317,21 @@ class AnimationWidget extends React.Component {+ `${hasSubdailyLayers ? 'subdaily ' : ''}`+ `${isMobile ? 'mobile ' : ''}`+ `${isLandscape ? 'landscape ' : ''}`;+ const subdailyID = hasSubdailyLayers ? '-subdaily' : '';++ const getWidgetIDs = () => {+ if ((isMobilePhone && isPortrait) || (!isMobileTablet && screenWidth < 670 && hasSubdailyLayers) || (!isMobileTablet && screenWidth < 575 && !hasSubdailyLayers)) {+ return `-phone-portrait${subdailyID}`;+ } if (isMobilePhone && isLandscape) {+ return `-phone-landscape${subdailyID}`;+ } if ((isMobileTablet && isPortrait) || (!isMobilePhone && screenWidth < breakpoints.small)) {+ return `-tablet-portrait${subdailyID}`;+ } if (isMobileTablet && isLandscape) {+ return `-tablet-landscape${subdailyID}`;+ }+ };++ const widgetIDs = getWidgetIDs();return !dontShow && (<Draggable@@ -304,6 +344,7 @@ class AnimationWidget extends React.Component {><divclassName={widgetClasses}+ id={`collapsed-animate-widget${widgetIDs}`}><divid="wv-animation-widget"@@ -324,6 +365,122 @@ class AnimationWidget extends React.Component {);}+ renderMobileWidget() {+ const {+ looping,+ isPlaying,+ maxDate,+ minDate,+ onSlide,+ sliderLabel,+ startDate,+ endDate,+ subDailyMode,+ hasSubdailyLayers,+ isMobile,+ isMobilePhone,+ isMobileTablet,+ screenWidth,+ screenHeight,+ breakpoints,+ isLandscape,+ isPortrait,+ playDisabled,+ } = this.props;+ const { speed } = this.state;++ const minimumDate = getISODateFormatted(minDate);+ const maximumDate = getISODateFormatted(maxDate);+ const endingDate = getISODateFormatted(endDate);+ const startingDate = getISODateFormatted(startDate);++ const getMobileIDs = () => {+ if ((isMobilePhone && isLandscape) || (!isMobilePhone && !isMobileTablet && screenHeight < 800)) {+ return 'mobile-phone-landscape';+ } if ((isMobilePhone && isPortrait) || (!isMobilePhone && !isMobileTablet && screenWidth < 550)) {+ return 'mobile-phone-portrait';+ } if (isMobileTablet || screenWidth <= breakpoints.small) {+ return 'tablet';+ }+ };++ const mobileID = getMobileIDs();++ return (+ <div className="wv-animation-widget-wrapper-mobile" id={`mobile-animation-widget-${mobileID}`}>+ <div className="mobile-animation-header">+ <span className="close wv-minimize" aria-label="Close" onClick={this.toggleCollapse}>+ <FontAwesomeIcon icon="times" id="mobile-close-btn" />+ </span>+ </div>+ <div className="mobile-animation-warning-message-container">+ <span id={playDisabled ? 'mobile-animation-warning-message' : ''}>Too many animation frames. Reduce time range or increase increment size.</span>+ </div>+ <div+ 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-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-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-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>+ );+ }+renderExpandedWidget() {const {onClose,@@ -445,8 +602,9 @@ class AnimationWidget extends React.Component {delta,interval,numberOfFrames,+ isCollapsed,} = this.props;- const { speed, collapsed } = this.state;+ const { speed } = this.state;if (!isActive) {return null;@@ -474,7 +632,7 @@ class AnimationWidget extends React.Component {)}{!isDistractionFreeModeActive && (<>- {collapsed || isMobile ? this.renderCollapsedWidget() : this.renderExpandedWidget()}+ {isCollapsed ? this.renderCollapsedWidget() : isMobile ? this.renderMobileWidget() : this.renderExpandedWidget()}</>)}</ErrorBoundary>@@ -497,7 +655,7 @@ function mapStateToProps(state) {proj,} = state;const {- startDate, endDate, speed, loop, isPlaying, isActive,+ startDate, endDate, speed, loop, isPlaying, isActive, isCollapsed,} = animation;const {customSelected,@@ -510,6 +668,7 @@ function mapStateToProps(state) {interval,customInterval,} = date;+ const { isCompareA } = compare;const hasSubdailyLayers = subdailyLayersActive(state);const activeLayersForProj = getAllActiveLayers(state);@@ -540,16 +699,17 @@ function mapStateToProps(state) {const useDelta = customSelected && customDelta ? customDelta : delta;const subDailyInterval = useInterval > 3;const subDailyMode = subDailyInterval && hasSubdailyLayers;+ const frameLimit = screenSize.isMobileDevice ? mobileMaxFrames : maxFrames;const numberOfFrames = getNumberOfSteps(startDate,endDate,TIME_SCALE_FROM_NUMBER[useInterval],useDelta,- maxFrames,+ frameLimit,);const currentDate = getSelectedDate(state);let snappedCurrentDate;- if (numberOfFrames < maxFrames) {+ if (numberOfFrames < frameLimit) {snappedCurrentDate = snapToIntervalDelta(currentDate,startDate,@@ -561,13 +721,18 @@ function mapStateToProps(state) {snappedCurrentDate = currentDate;}+ const {+ isMobilePhone, screenWidth, isMobileTablet, breakpoints, screenHeight,+ } = screenSize;+return {appNow,- screenWidth: screenSize.screenWidth,animationCustomModalOpen,customSelected,startDate,endDate,+ isCollapsed,+ draggerSelected: isCompareA ? 'selected' : 'selectedB',snappedCurrentDate,currentDate,minDate,@@ -575,7 +740,13 @@ function mapStateToProps(state) {isActive: animationIsActive,isDistractionFreeModeActive,isMobile: screenSize.isMobileDevice,+ isMobilePhone,+ isMobileTablet,+ breakpoints,isLandscape: screenSize.orientation === 'landscape',+ isPortrait: screenSize.orientation === 'portrait',+ screenWidth,+ screenHeight,hasFutureLayers,hasSubdailyLayers,subDailyMode,@@ -592,7 +763,7 @@ function mapStateToProps(state) {proj,promiseImageryForTime: (date) => promiseImageryForTime(state, date),isEmbedModeActive,- playDisabled: numberOfFrames >= maxFrames || numberOfFrames === 1,+ playDisabled: !screenSize.isMobileDevice ? numberOfFrames >= maxFrames || numberOfFrames === 1 : numberOfFrames >= mobileMaxFrames || numberOfFrames === 1,};}@@ -630,6 +801,9 @@ const mapDispatchToProps = (dispatch) => ({onUpdateStartAndEndDate: (startDate, endDate) => {dispatch(changeStartAndEndDate(startDate, endDate));},+ onToggleAnimationCollapse: () => {+ dispatch(toggleAnimationCollapse());+ },});export default connect(@@ -645,6 +819,7 @@ RangeHandle.propTypes = {AnimationWidget.propTypes = {appNow: PropTypes.object,animationCustomModalOpen: PropTypes.bool,+ breakpoints: PropTypes.object,snappedCurrentDate: PropTypes.object,currentDate: PropTypes.object,customDelta: PropTypes.number,@@ -655,15 +830,20 @@ AnimationWidget.propTypes = {hasSubdailyLayers: PropTypes.bool,interval: PropTypes.string,isActive: PropTypes.bool,+ isCollapsed: PropTypes.bool,isDistractionFreeModeActive: PropTypes.bool,isEmbedModeActive: PropTypes.bool,isMobile: PropTypes.bool,+ isMobilePhone: PropTypes.bool,+ isMobileTablet: PropTypes.bool,isPlaying: PropTypes.bool,+ isPortrait: PropTypes.bool,isLandscape: PropTypes.bool,looping: PropTypes.bool,maxDate: PropTypes.object,minDate: PropTypes.object,numberOfFrames: PropTypes.number,+ onToggleAnimationCollapse: PropTypes.func,onClose: PropTypes.func,onIntervalSelect: PropTypes.func,onPushLoop: PropTypes.func,@@ -675,6 +855,7 @@ AnimationWidget.propTypes = {onUpdateStartDate: PropTypes.func,playDisabled: PropTypes.bool,promiseImageryForTime: PropTypes.func,+ screenHeight: PropTypes.number,screenWidth: PropTypes.number,selectDate: PropTypes.func,sliderLabel: PropTypes.string,diff --git a/web/js/containers/timeline/timeline.js b/web/js/containers/timeline/timeline.jsindex ee784f145..a9229655f 100644--- a/web/js/containers/timeline/timeline.js+++ b/web/js/containers/timeline/timeline.js@@ -60,6 +60,8 @@ import {changeStartAndEndDate,changeStartDate,changeEndDate,+ toggleAnimationCollapse,+ stop as pauseAnimation,} from '../../modules/animation/actions';import {TIME_SCALE_FROM_NUMBER,@@ -163,7 +165,9 @@ class Timeline extends React.Component {}componentDidMount() {- const { nowOverride } = this.props;+ const {+ nowOverride,+ } = this.props;document.addEventListener('keydown', this.handleKeyDown);document.addEventListener('keyup', this.handleKeyUp);// prevent default react synthetic event passive event listener@@ -175,6 +179,7 @@ class Timeline extends React.Component {this.checkAndUpdateAppNow = this.checkAndUpdateAppNow.bind(this);this.appNowUpdateInterval = setInterval(this.checkAndUpdateAppNow, 60000 * 10);}+this.setInitialState();}@@ -565,8 +570,21 @@ class Timeline extends React.Component {* @returns {void}*/clickAnimationButton = () => {- const { closeAnimation, isAnimationWidgetOpen, openAnimation } = this.props;- if (isAnimationWidgetOpen) {+ const {+ closeAnimation,+ isAnimationWidgetOpen,+ openAnimation,+ isMobile,+ onPauseAnimation,+ onToggleAnimationCollapse,+ } = this.props;++ if (isAnimationWidgetOpen && isMobile) {+ onToggleAnimationCollapse();+ onPauseAnimation();+ } else if (isMobile && !isAnimationWidgetOpen) {+ openAnimation();+ } else if (isAnimationWidgetOpen) {closeAnimation();} else {googleTagManager.pushEvent({@@ -868,8 +886,6 @@ class Timeline extends React.Component {screenWidth,} = this.props;- const isScreenWidthLessThan484 = screenWidth < 484;-// default positioninglet mobileLeft = 190;let mobileBottom = 20;@@ -886,7 +902,7 @@ class Timeline extends React.Component {if (isEmbedModeActive) {mobileLeft = 220;}- } else if (isScreenWidthLessThan484) {+ } else if (screenWidth < 575) {mobileLeft = isCompareModeActive ? 112 : 10;mobileBottom = 75;if (isEmbedModeActive) {@@ -920,8 +936,22 @@ class Timeline extends React.Component {renderMobile() {const {- isMobile, timelineStartDateLimit, timelineEndDateLimit, hasSubdailyLayers, selectedDate,+ animationDisabled,+ hasSubdailyLayers,+ isCompareModeActive,+ isDataDownload,+ isMobile,+ isMobilePhone,+ isMobileTablet,+ isLandscape,+ isPortrait,+ breakpoints,+ screenWidth,+ selectedDate,+ timelineEndDateLimit,+ timelineStartDateLimit,} = this.props;+return (<div id="timeline-header" className="timeline-header-mobile"><MobileDatePicker@@ -941,6 +971,29 @@ class Timeline extends React.Component {{this.renderDateChangeArrows()}</div></div>+ <div>+ {!isCompareModeActive && (+ <AnimationButton+ isMobile={isMobile}+ breakpoints={breakpoints}+ screenWidth={screenWidth}+ isMobilePhone={isMobilePhone}+ isMobileTablet={isMobileTablet}+ isLandscape={isLandscape}+ isPortrait={isPortrait}+ clickAnimationButton={this.clickAnimationButton}+ hasSubdailyLayers={hasSubdailyLayers}+ disabled={animationDisabled}+ label={+ isCompareModeActive+ ? 'Animation feature is deactivated when Compare feature is active'+ : isDataDownload+ ? 'Animation feature is deactivated when Data Download feature is active'+ : ''+ }+ />+ )}+ </div></div>);}@@ -953,6 +1006,7 @@ class Timeline extends React.Component {animStartLocationDate,appNow,axisWidth,+ breakpoints,dateA,dateB,draggerSelected,@@ -969,6 +1023,7 @@ class Timeline extends React.Component {isMobile,isTourActive,parentOffset,+ screenWidth,selectedDate,timelineCustomModalOpen,timelineEndDateLimit,@@ -1070,6 +1125,8 @@ class Timeline extends React.Component {<AnimationButtonclickAnimationButton={this.clickAnimationButton}disabled={animationDisabled}+ screenWidth={screenWidth}+ breakpoints={breakpoints}label={isCompareModeActive? 'Animation feature is deactivated when Compare feature is active'@@ -1292,12 +1349,18 @@ function mapStateToProps(state) {selectedZoom,timelineCustomModalOpen,} = date;- const { screenWidth } = screenSize;const { isCompareA } = compare;const isCompareModeActive = compare.active;const { isDistractionFreeModeActive } = ui;const { isEmbedModeActive } = embed;const isMobile = screenSize.isMobileDevice;+ const {+ breakpoints,+ screenWidth,+ isMobilePhone,+ isMobileTablet,+ orientation,+ } = screenSize;const { isAnimatingToEvent } = events;// handle active layer filtering and check for subdaily@@ -1365,7 +1428,13 @@ function mapStateToProps(state) {activeLayers: activeLayersFiltered,isTourActive: tour.active,isMobile,+ isMobilePhone,+ isMobileTablet,+ orientation,+ isLandscape: screenSize.orientation === 'landscape',+ isPortrait: screenSize.orientation === 'portrait',screenWidth,+ breakpoints,draggerSelected: isCompareA ? 'selected' : 'selectedB',hasSubdailyLayers,customSelected,@@ -1399,6 +1468,7 @@ function mapStateToProps(state) {|| compare.active,isDataDownload: sidebar.activeTab === 'download',isAnimationPlaying: animation.isPlaying,+ isAnimationCollapsed: animation.isCollapsed,isGifActive: animation.gifActive,timelineCustomModalOpen,isDistractionFreeModeActive,@@ -1455,6 +1525,13 @@ const mapDispatchToProps = (dispatch) => ({onUpdateStartAndEndDate: (startDate, endDate) => {dispatch(changeStartAndEndDate(startDate, endDate));},+ // unminimize animation widget in mobile+ onToggleAnimationCollapse: () => {+ dispatch(toggleAnimationCollapse());+ },+ onPauseAnimation: () => {+ dispatch(pauseAnimation());+ },});export default connect(@@ -1469,6 +1546,7 @@ Timeline.propTypes = {animEndLocationDate: PropTypes.object,animStartLocationDate: PropTypes.object,axisWidth: PropTypes.number,+ breakpoints: PropTypes.object,changeTimeScale: PropTypes.func,closeAnimation: PropTypes.func,customSelected: PropTypes.bool,@@ -1488,10 +1566,16 @@ Timeline.propTypes = {isEmbedModeActive: PropTypes.bool,isGifActive: PropTypes.bool,isMobile: PropTypes.bool,+ isMobilePhone: PropTypes.bool,+ isMobileTablet: PropTypes.bool,+ isLandscape: PropTypes.bool,+ isPortrait: PropTypes.bool,isTourActive: PropTypes.bool,leftArrowDisabled: PropTypes.bool,nowButtonDisabled: PropTypes.bool,nowOverride: PropTypes.bool,+ onPauseAnimation: PropTypes.func,+ onToggleAnimationCollapse: PropTypes.func,onUpdateEndDate: PropTypes.func,onUpdateStartAndEndDate: PropTypes.func,onUpdateStartDate: PropTypes.func,diff --git a/web/js/modules/animation/actions.js b/web/js/modules/animation/actions.jsindex dc693d611..7aa8d83a1 100644--- a/web/js/modules/animation/actions.js+++ b/web/js/modules/animation/actions.js@@ -10,6 +10,7 @@ import {UPDATE_END_DATE,UPDATE_CROP_BOUNDS,TOGGLE_GIF,+ COLLAPSE_ANIMATION,} from './constants';import util from '../../util/util';import { TIME_SCALE_FROM_NUMBER } from '../date/constants';@@ -101,3 +102,8 @@ export function toggleComponentGifActive() {type: TOGGLE_GIF,};}+export function toggleAnimationCollapse() {+ return {+ type: COLLAPSE_ANIMATION,+ };+}diff --git a/web/js/modules/animation/constants.js b/web/js/modules/animation/constants.jsindex 90a30b17a..1a27ba6cf 100644--- a/web/js/modules/animation/constants.js+++ b/web/js/modules/animation/constants.js@@ -10,3 +10,4 @@ export const UPDATE_END_DATE = 'ANIMATION/UPDATE_END_DATE';export const UPDATE_CROP_BOUNDS = 'ANIMATION/UPDATE_CROP_BOUNDS';export const TOGGLE_GIF = 'ANIMATION/TOGGLE_GIF';export const KEY_PRESS_ACTION = 'ANIMATION/KEY_PRESS_ACTION';+export const COLLAPSE_ANIMATION = 'ANIMATION/COLLAPSE_ANIMATION';diff --git a/web/js/modules/animation/reducers.js b/web/js/modules/animation/reducers.jsindex 72b2dbfd7..5a67fa9d5 100644--- a/web/js/modules/animation/reducers.js+++ b/web/js/modules/animation/reducers.js@@ -12,6 +12,7 @@ import {UPDATE_CROP_BOUNDS,TOGGLE_GIF,KEY_PRESS_ACTION,+ COLLAPSE_ANIMATION,} from './constants';export const defaultState = {@@ -23,6 +24,7 @@ export const defaultState = {startDate: undefined,endDate: undefined,boundaries: undefined,+ isCollapsed: false,};export function getInitialState(config) {return {@@ -98,6 +100,11 @@ export function animationReducer(state = defaultState, action) {gifActive: !state.gifActive,isPlaying: false,};+ case COLLAPSE_ANIMATION:+ return {+ ...state,+ isCollapsed: !state.isCollapsed,+ };case KEY_PRESS_ACTION:if (action.keyCode === 32 && state.isActive) {return {diff --git a/web/js/modules/screen-size/actions.js b/web/js/modules/screen-size/actions.jsindex 4521674ed..a2421b3d5 100644--- a/web/js/modules/screen-size/actions.js+++ b/web/js/modules/screen-size/actions.js@@ -8,6 +8,8 @@ export default function setScreenInfo() {const screenWidth = window.innerWidth;const isMobileDevice = screenWidth < 768 || isMobileOnly || isTablet;const orientation = screenHeight > screenWidth ? 'portrait' : 'landscape';+ const isMobilePhone = isMobileOnly;+ const isMobileTablet = isTablet;return {type: SET_SCREEN_INFO,@@ -15,5 +17,7 @@ export default function setScreenInfo() {screenWidth,isMobileDevice,orientation,+ isMobilePhone,+ isMobileTablet,};}diff --git a/web/js/modules/screen-size/reducer.js b/web/js/modules/screen-size/reducer.jsindex 2005943b0..925febf8e 100644--- a/web/js/modules/screen-size/reducer.js+++ b/web/js/modules/screen-size/reducer.js@@ -6,6 +6,8 @@ export const initialState = {isMobileDevice: false,orientation: '',breakpoints: {},+ isMobilePhone: false,+ isMobileTablet: false,};export const getInitialState = () => ({@@ -26,6 +28,8 @@ export const screenSizeReducer = (state = initialState, action) => {screenWidth: action.screenWidth,isMobileDevice: action.isMobileDevice,orientation: action.orientation,+ isMobilePhone: action.isMobilePhone,+ isMobileTablet: action.isMobileTablet,};default:return state;diff --git a/web/scss/features/anim-widget.scss b/web/scss/features/anim-widget.scssindex c0f20785b..5690e45b5 100644--- a/web/scss/features/anim-widget.scss+++ b/web/scss/features/anim-widget.scss@@ -3,6 +3,46 @@z-index: 100;}+#collapsed-animate-widget-phone-portrait {+ bottom: 20px;+ left: 190px;+}++#collapsed-animate-widget-phone-portrait-subdaily {+ bottom: 75px;+ left: 210px;+}++#collapsed-animate-widget-phone-landscape {+ bottom: 20px;+ left: 390px;+}++#collapsed-animate-widget-phone-landscape-subdaily {+ bottom: 20px;+ left: 485px;+}++#collapsed-animate-widget-tablet-portrait {+ bottom: 20px;+ left: 400px;+}++#collapsed-animate-widget-tablet-portrait-subdaily {+ bottom: 20px;+ left: 495px;+}++#collapsed-animate-widget-tablet-landscape {+ bottom: 20px;+ left: 400px;+}++#collapsed-animate-widget-tablet-landscape-subdaily {+ bottom: 20px;+ left: 495px;+}+@media (min-width: $tablet-min-width) {.wv-animation-widget-wrapper {bottom: 88px;@@ -20,10 +60,10 @@&.minimized {bottom: 20px;- left: 320px;+ left: 390px;&.landscape {- left: 323px;+ left: 390px;}}@@ -53,7 +93,18 @@@media (max-width: 483px) {.wv-animation-widget-wrapper.mobile.minimized {- left: 200px;+ left: 190px;++ & #play-button {+ width: 100px;+ }+ }+}++@media (max-width: 483px) {+ .wv-animation-widget-wrapper.mobile.minimized.subdaily {+ left: 210px;+ bottom: 75px;}}@@ -118,7 +169,7 @@display: inline-block;height: 35px;width: 42px;- background: #295f92;+ background: $wv-dark-blue;position: relative;border-radius: 5px;@@ -357,3 +408,276 @@ a .wv-animation-widget-icon {display: inline;position: relative;}++/* mobile animation widget styles */+.wv-animation-widget-wrapper-mobile {+ position: absolute;+ z-index: 100;+ width: 100%;+ height: 100%;+ box-sizing: border-box;+ bottom: 0;++ & .mobile-animation-header {+ padding: 0 20px 0 10px;+ background-color: #333;+ border-bottom: $wv-dark-menu-border;+ border-top-left-radius: 6px;+ border-top-right-radius: 6px;+ display: flex;+ justify-content: flex-end;+ align-items: center;++ & .wv-minimize {+ font-size: 26px;+ font-weight: 400;+ color: #cacaca;+ opacity: 1;+ padding: 10px 12px;+ cursor: pointer;++ &:hover {+ opacity: 2;+ color: white;+ }+ }+ }++ & .mobile-animation-warning-message-container {+ display: flex;+ justify-content: center;+ width: 100%;+ margin: auto;+ text-align: center;+ background: $wv-solid-black;+ min-height: 30px;++ & span {+ visibility: hidden;+ line-height: normal;+ max-height: 25px;+ min-height: 25px;+ }++ & #mobile-animation-warning-message {+ color: red;+ font-size: 18px;+ visibility: visible;+ text-align: center;+ padding: 0;+ }+ }++ & .wv-animation-widget {+ margin: 0;+ width: 100%;+ height: 100%;+ background: $wv-solid-black;+ border-radius: 0;+ margin-top: 0;+ padding: 0;++ & #loop-button {+ height: 4em;+ width: 5em;+ margin-top: 10px;+ }++ & .mobile-animation-widget-container {+ margin: 0;+ width: 98%;+ height: 80%;+ display: grid;+ grid-template-columns: repeat(2, 1fr);+ gap: 5px;+ }++ #slider-case-row {+ grid-column: 1 / -1;+ width: 100%;+ margin-top: 1rem;++ & .wv-slider-label {+ text-align: center;+ margin: auto;+ }++ & .rc-slider {+ margin: auto;+ }+ }++ & #warning-message-row {+ grid-column: 1 / -1;+ max-height: 48px;+ margin-bottom: 0;+ }++ & .mobile-animation-block-row {+ text-align: center;+ font-size: 18px;++ & .mobile-date-picker-select-btn {+ position: relative;+ background-color: $wv-dark-blue;+ bottom: -10%;+ width: 95%;+ }+ }++ & .mobile-animation-flex-row {+ display: flex;+ justify-content: center;+ align-items: center;+ width: 100%;+ flex-direction: column;++ span {+ font-size: 18px;+ line-height: normal;+ text-align: center;+ }++ .wv-icon-case {+ height: 45px;+ width: 52px;+ }++ & .mobile-date-picker-select-btn {+ position: relative;+ background-color: $wv-dark-blue;++ & span {+ margin: 20px;+ }+ }+ }+ }+}++#mobile-animation-widget-mobile-phone-landscape {+ & .wv-animation-widget {+ & .rc-slider {+ width: 400px;+ }+ }+}++#mobile-animation-widget-mobile-phone-portrait {+ height: 100%;+ bottom: 0;++ & .mobile-animation-widget-container {+ height: 90%;++ & .wv-minimize {+ top: 1px;+ }++ & .mobile-animation-block-row {+ grid-column: 1 / -1;+ }++ & .mobile-animation-flex-row {+ grid-column: 1 / -1;+ flex-direction: column;+ width: 100%;++ & #loop-button {+ margin-top: 7px;+ height: 54px;+ }++ & .wv-slider-case {+ margin-top: 1.5rem;++ & .rc-slider {+ width: 300px;+ }+ }++ & span {+ text-align: center;+ margin: 0;+ }+ }+ }+}++#mobile-animation-widget-tablet {+ height: 50%;+ bottom: 0;++ & .mobile-animation-widget-container {+ margin: 0;+ }++ & .wv-minimize {+ top: 1px;+ }++ & .rc-slider {+ width: 400px;+ }+}++.mobile-timescale-dropdown {+ & .dropdown-toggle {+ font-size: 18px;+ background-color: $wv-dark-blue;+ height: 3em;+ width: 103px;+ border-top-left-radius: 0;+ border-bottom-left-radius: 0;+ }++ & .dropdown-menu {+ background-color: $wv-solid-black;+ border: solid 1px white;+ }++ & .dropdown-item {+ text-align: center;+ margin-top: 2px;+ }++ & span {+ text-align: center;+ color: white;+ width: 100%;+ margin: 0 !important;+ }+}++.custom-animation-interval-container {+ width: 100%;++ & .custom-animation-interval-header {+ font-size: 18px;+ text-align: center;+ line-height: 1.5rem;+ margin-bottom: 10px;+ border: none;+ }++ & .custom-interval-widget-controls-container {+ width: 100%;+ margin: auto;+ display: flex;+ justify-content: center;+ }++ & .custom-interval-delta-input {+ font-size: 18px;+ height: 3em;+ border: 0;+ border-radius: 4px;+ border-top-right-radius: 0;+ border-bottom-right-radius: 0;+ background-color: $wv-dark-gray;+ }++ & .mobile-timescale-dropdown {+ border: 0;+ }+}diff --git a/web/scss/features/timeline.scss b/web/scss/features/timeline.scssindex 79add8c6a..d4c327bd5 100644--- a/web/scss/features/timeline.scss+++ b/web/scss/features/timeline.scss@@ -820,3 +820,52 @@ button:focus {#timeline-header .button-action-group .now-btn-1:hover svg path {fill: #1a1a1a;}++.mobile-animate-button {+ position: absolute;+ background: $wv-transparent-black;+ border: thin solid #333;+ height: 44px;+ width: 60px;+ border-radius: 5px;+}++.animate-button-phone-portrait {+ left: 140px;+ bottom: 75px;+}++.animate-button-phone-portrait-subdaily {+ left: 140px;+ bottom: 75px;+}++.animate-button-phone-landscape {+ left: 320px;+ bottom: 20px;+}++.animate-button-phone-landscape-subdaily {+ left: 420px;+ bottom: 20px;+}++.animate-button-tablet-portrait {+ left: 325px;+ bottom: 20px;+}++.animate-button-tablet-portrait-subdaily {+ left: 420px;+ bottom: 20px;+}++.animate-button-tablet-landscape {+ left: 323px;+ bottom: 20px;+}++.animate-button-tablet-landscape-subdaily {+ left: 420px;+ bottom: 20px;+}diff --git a/web/scss/variables.scss b/web/scss/variables.scssindex 5b39301ec..b519dcf1e 100644--- a/web/scss/variables.scss+++ b/web/scss/variables.scss@@ -4,6 +4,7 @@ $wv-transparent-black: rgb(40 40 40 / 85%);$wv-solid-black: #282828;$wv-white-font: #eee;$wv-dark-gray: #666;+$wv-dark-blue: #295f92;/* Shadows */$wv-map-text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;