Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

scale down ui els in embed mode

Ed Platoe3aa2efcf6d3
diff --git a/web/css/embed.css b/web/css/embed.css
index 2bf7f83ec..ffc5e8839 100644
--- a/web/css/embed.css
+++ b/web/css/embed.css
@@ -36,7 +36,7 @@
z-index: 102;
top: 10px;
right: 10px;
- font-size: 14px;
+ font-size: 12px;
padding: 2.5px 4px;
}
@@ -49,19 +49,29 @@
.event-container {
min-height: 75px;
}
+ #wv-eventscontent li h4.title {
+ width: 85%;
+ }
.layer-group-case .layer-group-header {
margin-top: 0;
& .layer-group-title {
+ white-space: pre-wrap;
+ text-overflow: inherit;
font-size: 12px;
}
}
.layer-group-baselayers {
margin-top: 0;
}
+ .layer-group-more-options {
+ display: none;
+ }
.sidebar-panel li.item h4 {
- font-size: 12px;
+ width: 95%;
+ font-size: 13px;
}
#wv-sidebar {
+ transform: scale(0.75);
#download-sidebar-tab {
display: none;
}
@@ -103,33 +113,58 @@
}
}
+ /* TIMELINE */
+ .mobile-date-picker-select-btn {
+ transform: scale(0.75);
+ transform-origin: bottom left;
+ }
+ .mobile-date-change-arrows-btn {
+ left: 168px;
+ transform: scale(0.75);
+ }
+
/* COMPARE */
+ .comparison-mobile-select-toggle {
+ transform-origin: bottom left;
+ transform: scale(0.75);
+ bottom: 50px;
+ }
.ab-swipe-dragger {
- bottom: 132px;
+ bottom: 100px;
}
.ab-swipe-line .ab-swipe-span {
- bottom: 119px;
+ bottom: 90px;
}
.ab-slider-case {
- bottom: 74px;
+ bottom: 50px;
}
/* COORDS/SCALE */
#ol-coords-case {
+ transform: scale(0.85);
+ transform-origin: right;
bottom: 8px;
}
.wv-map-scale-imperial {
+ transform: scale(0.85);
+ transform-origin: right;
bottom: 50px;
right: 12px;
}
.wv-map-scale-metric {
+ transform: scale(0.85);
+ transform-origin: right;
bottom: 68px;
right: 12px;
}
/* ANIMATION WIDGET */
+ .wv-animation-widget {
+ transform: scale(0.85);
+ transform-origin: bottom left;
+ }
.wv-animation-widget-wrapper.minimized {
- bottom: 64px;
+ bottom: 55px;
}
#wv-animation-widget .wv-close {
opacity: 0.3;
@@ -147,12 +182,12 @@
@media only screen and (max-width: 576px) {
.ab-slider-case {
- bottom: 120px;
+ bottom: 90px;
}
}
- @media only screen and (max-width: 350px) {
+ @media only screen and (max-width: 450px) {
.wv-animation-widget-wrapper.minimized {
- left: 110px;
+ left: 93px;
}
}
}
diff --git a/web/css/timeline.css b/web/css/timeline.css
index cc901997c..ef7b5395d 100644
--- a/web/css/timeline.css
+++ b/web/css/timeline.css
@@ -706,7 +706,7 @@ button:focus {
border-radius: 5px;
cursor: pointer;
height: 44px;
-
+ width: 88px;
& .button-action-group {
height: 37px;
border-top-right-radius: 5px;
diff --git a/web/js/containers/sidebar/layers-container.js b/web/js/containers/sidebar/layers-container.js
index 32029235a..9d4702cc0 100644
--- a/web/js/containers/sidebar/layers-container.js
+++ b/web/js/containers/sidebar/layers-container.js
@@ -114,7 +114,7 @@ function LayersContainer (props) {
: height;
if (isEmbedModeActive) {
- minHeight = '100px';
+ minHeight = '25px';
maxHeight = '55vh';
} else {
maxHeight += 'px';
diff --git a/web/js/containers/timeline/timeline.js b/web/js/containers/timeline/timeline.js
index 51b94cd27..e6aec07fb 100644
--- a/web/js/containers/timeline/timeline.js
+++ b/web/js/containers/timeline/timeline.js
@@ -972,35 +972,40 @@ class Timeline extends React.Component {
const {
hasSubdailyLayers,
isCompareModeActive,
+ isEmbedModeActive,
screenWidth,
} = this.props;
- const isScreenWidthLessThan350 = screenWidth < 350;
const isScreenWidthLessThan450 = screenWidth < 450;
// default positioning
- let mobileLeft = '190px';
- let mobileBottom = '10px';
-
+ let mobileLeft = 190;
+ let mobileBottom = 10;
+ if (isEmbedModeActive) {
+ mobileLeft = 135;
+ mobileBottom = 4;
+ }
// positioning will change depending on a combination of:
// 1) subdaily (mobile date picker width);
// 2) screen width; and
// 3) compare mode
- if (hasSubdailyLayers) {
- if (isScreenWidthLessThan450) {
- mobileLeft = isCompareModeActive ? '112px' : '10px';
- mobileBottom = '65px';
- } else {
- mobileLeft = '287px';
+ if (hasSubdailyLayers && screenWidth >= 450) {
+ mobileLeft = 287;
+ if (isEmbedModeActive) {
+ mobileLeft = 210;
+ }
+ } else if (isScreenWidthLessThan450) {
+ mobileLeft = isCompareModeActive ? 112 : 10;
+ mobileBottom = 65;
+ if (isEmbedModeActive) {
+ mobileLeft = isCompareModeActive ? 80 : 0;
+ mobileBottom = 45;
}
- } else if (isScreenWidthLessThan350) {
- mobileLeft = isCompareModeActive ? '112px' : '10px';
- mobileBottom = '65px';
}
return {
- left: mobileLeft,
- bottom: mobileBottom,
+ left: `${mobileLeft}px`,
+ bottom: `${mobileBottom}px`,
};
}