Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

select a non-subdaily interval when subdail layers removed. clean up animation widget dialog styles

Jason Kentb7aec6cc4066
diff --git a/web/css/anim.widget.css b/web/css/anim.widget.css
index 5c93119c4..8e394ee94 100644
--- a/web/css/anim.widget.css
+++ b/web/css/anim.widget.css
@@ -1,7 +1,7 @@
.wv-animation-widget {
- width: 330px;
+ width: 334px;
border-radius: 8px;
- height: 125px;
+ height: 134px;
background: #212121;
position: absolute;
transform: translateX(-50%);
@@ -9,63 +9,90 @@
bottom: 125px;
left: 50%;
color: #fff;
-
+ & .wv-animation-widget-header {
+ display: block;
+ text-align: center;
+ margin-bottom: 10px;
+ text-transform: capitalize;
+ & .interval-btn-container,
+ & .interval-btn.interval-btn-active {
+ color: #ce4c21;
+ display: inline;
+ }
+ & .wv-tooltip {
+ bottom: 128px;
+ left: 44%;
+ position: absolute;
+ border-bottom: 8px solid transparent;
+ width: 100px;
+ z-index: 10;
+ }
+ }
+ & > a,
+ & > div {
+ display: inline-block;
+ margin: 7px 0 0 10px;
+ }
& .custom-interval-widget {
top: -61px;
left: 48px;
}
-}
-
-.wv-animation-widget.subdaily {
- width: 460px;
-}
-.wv-animation-widget .wv-slider-case {
- padding-right: 3px;
- padding-left: 3px;
-}
-.wv-animation-widget > a,
-.wv-animation-widget > div {
- display: inline-block;
- margin: 7px 0 0 10px;
-}
-
-.wv-animation-widget .wv-animation-widget-header {
- display: block;
- text-align: center;
- margin-bottom: 7px;
- text-transform: capitalize;
-
- & .interval-btn-container,
- & .interval-btn.interval-btn-active {
- color: #ce4c21;
- display: inline;
+ & .wv-icon-case {
+ display: inline-block;
+ height: 35px;
+ width: 42px;
+ background: #295f92;
+ position: relative;
+ border-radius: 5px;
+ &.disabled {
+ cursor: default;
+ & .wv-animation-widget-icon {
+ color: rgba(255, 255, 255, 0.3);
+ opacity: 0.5;
+ }
+ }
+ }
+ &.subdaily {
+ width: 460px;
+ & .input-range {
+ width: 278px;
+ }
+ & .custom-interval-widget {
+ left: 113px;
+ }
}
- & .wv-tooltip {
- bottom: 120px;
- left: 44%;
+ & .wv-slider-case {
+ padding-right: 3px;
+ padding-left: 3px;
+ }
+ & .thru-label {
position: absolute;
- border-bottom: 8px solid transparent;
- width: 100px;
- z-index: 10;
+ transform: translate(-50%, 0);
+ -webkit-transform: translate(-50%, 0);
+ color: #fff;
+ left: 50%;
+ text-align: center;
+ bottom: 16px;
+ z-index: 0;
+ }
+ & .input-range {
+ cursor: pointer;
+ height: 13px;
+ position: relative;
+ width: 152px;
+ }
+ & i.wv-close {
+ position: absolute;
+ top: 5px;
+ right: 5px;
+ &:hover {
+ color: #999;
+ cursor: pointer;
+ }
}
}
-.wv-animation-widget .wv-icon-case {
- display: inline-block;
- height: 35px;
- width: 42px;
- background: #295f92;
- position: relative;
- border-radius: 5px;
-}
-.wv-icon-case.disabled {
- cursor: default;
-}
-.wv-animation-widget .wv-icon-case.disabled .wv-animation-widget-icon {
- color: rgba(255, 255, 255, 0.3);
- opacity: 0.5;
-}
-.wv-animation-widget a .wv-animation-widget-icon {
+a .wv-animation-widget-icon {
font-size: 23px;
color: #fff;
position: absolute;
@@ -73,19 +100,18 @@
-webkit-transform: translate(-50%, -50%);
left: 50%;
top: 50%;
-}
-
-.wv-animation-widget a .wv-animation-widget-icon:hover {
- color: #fff;
- opacity: 0.5;
-}
-.wv-animation-widget a .wv-animation-widget-icon.fa-file-video {
- font-size: 29px;
-}
-.wv-animation-widget a .wv-animation-widget-icon.fa-retweet {
- font-size: 31px;
- color: #212121;
- opacity: 0.7;
+ &:hover {
+ color: #fff;
+ opacity: 0.5;
+ }
+ &.fa-file-video {
+ font-size: 29px;
+ }
+ &.fa-retweet {
+ font-size: 31px;
+ color: #212121;
+ opacity: 0.7;
+ }
}
.wv-animation-widget .active .wv-animation-widget-icon.fa-retweet {
@@ -111,17 +137,6 @@
margin: 0;
}
-.wv-animation-widget .thru-label {
- position: absolute;
- transform: translate(-50%, 0);
- -webkit-transform: translate(-50%, 0);
- color: #fff;
- left: 50%;
- text-align: center;
- bottom: 16px;
- z-index: 0;
-}
-
.wv-animation-widget .wv-date-selector-widget {
display: inline-block;
position: absolute;
@@ -195,17 +210,6 @@
display: block;
}
-.wv-animation-widget i.wv-close {
- position: absolute;
- top: 5px;
- right: 5px;
-}
-
-.wv-animation-widget i.wv-close:hover {
- color: #999;
- cursor: pointer;
-}
-
.gif-dialog {
color: #fff;
}
@@ -324,14 +328,3 @@
color: transparent;
pointer-events: none;
}
-
-.wv-animation-widget .input-range {
- cursor: pointer;
- height: 13px;
- position: relative;
- width: 152px;
-}
-
-.wv-animation-widget.subdaily .input-range {
- width: 224px;
-}
diff --git a/web/js/containers/animation-widget.js b/web/js/containers/animation-widget.js
index 15a669a0d..f30d53284 100644
--- a/web/js/containers/animation-widget.js
+++ b/web/js/containers/animation-widget.js
@@ -459,9 +459,6 @@ function mapStateToProps(state) {
activeLayersForProj,
palettes[activeStr]
);
- const useInterval = customSelected ? customInterval : interval;
- const subDailyInterval = useInterval > 3;
- const subDailyMode = subDailyInterval && hasSubdailyLayers;
const minDate = new Date(config.startDate);
const maxDate = appNow;
const animationIsActive = isActive &&
@@ -471,6 +468,14 @@ function mapStateToProps(state) {
!compare.active &&
!(modal.isOpen && modal.id === 'TOOLBAR_SNAPSHOT'); // No Animation when Image download is open
+ if (!hasSubdailyLayers) {
+ interval = interval > 3 ? 3 : interval;
+ customInterval = customInterval > 3 ? 3 : customInterval;
+ }
+ const useInterval = customSelected ? customInterval : interval;
+ const subDailyInterval = useInterval > 3;
+ const subDailyMode = subDailyInterval && hasSubdailyLayers;
+
return {
customSelected,
startDate,