Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

fix merge conflicts, update style for lower opacity on info and logo, prevent scale on resize

Ed Plato2c347bc5e44f
diff --git a/web/css/notifications.css b/web/css/notifications.css
index 4d0addbc4..8e1e1d5ca 100644
--- a/web/css/notifications.css
+++ b/web/css/notifications.css
@@ -35,6 +35,14 @@
display: none;
}
+.wv-info-button-distraction-free-mode {
+ opacity: 0.5;
+}
+
+.wv-info-button-distraction-free-mode:hover {
+ opacity: 1;
+}
+
.ui-menu-item {
position: relative;
}
diff --git a/web/css/sidebar.css b/web/css/sidebar.css
index 010d976c3..9c517b0c7 100644
--- a/web/css/sidebar.css
+++ b/web/css/sidebar.css
@@ -42,6 +42,13 @@
#wv-logo {
border-bottom: 1px solid transparent;
}
+.wv-logo-distraction-free-mode {
+ border-radius: 5px;
+ opacity: 0.5;
+}
+.wv-logo-distraction-free-mode:hover {
+ opacity: 1;
+}
#productsHolder ul#overlays {
margin-bottom: 10px;
}
diff --git a/web/js/components/timeline/distraction-free-time.js b/web/js/components/timeline/distraction-free-time.js
index a8da9599b..44ab5d5f0 100644
--- a/web/js/components/timeline/distraction-free-time.js
+++ b/web/js/components/timeline/distraction-free-time.js
@@ -29,7 +29,7 @@ class DistractionFreeTimeUI extends PureComponent {
} else {
displayDate = dateFirstHalfYMD.join(' ');
}
-// TODO: CREATE HEIGHT SPECIFIC CONTAINER FOR HOVER EFFECT SMOOTHER UX
+
return (
<div
className="distraction-free-date"
diff --git a/web/js/containers/sidebar/sidebar.js b/web/js/containers/sidebar/sidebar.js
index 0a01d7f97..d7840bd5a 100644
--- a/web/js/containers/sidebar/sidebar.js
+++ b/web/js/containers/sidebar/sidebar.js
@@ -182,6 +182,7 @@ class Sidebar extends React.Component {
href="/"
title="Click to Reset Worldview to Defaults"
id="wv-logo"
+ className={`${isDistractionFreeModeActive ? 'wv-logo-distraction-free-mode' : ''}`}
onClick={resetWorldview}
ref={iconElement => (this.iconElement = iconElement)}
onWheel={wheelCallBack}
diff --git a/web/js/containers/toolbar.js b/web/js/containers/toolbar.js
index 353fabf9f..763e4e205 100644
--- a/web/js/containers/toolbar.js
+++ b/web/js/containers/toolbar.js
@@ -201,7 +201,7 @@ class toolbarContainer extends Component {
<Button
id="wv-info-button"
title="Information"
- className={'wv-toolbar-button' + notificationClass}
+ className={`wv-toolbar-button${notificationClass} ${isDistractionFreeModeActive ? 'wv-info-button-distraction-free-mode' : ''}`}
onClick={() =>
openModal('TOOLBAR_INFO', CUSTOM_MODAL_PROPS.TOOLBAR_INFO)
}
@@ -329,12 +329,8 @@ toolbarContainer.propTypes = {
notificationType: PropTypes.string,
notify: PropTypes.func,
openModal: PropTypes.func,
-<<<<<<< HEAD
- requestNotifications: PropTypes.func,
- toggleDistractionFreeMode: PropTypes.func
-=======
refreshStateAfterImageDownload: PropTypes.func,
requestNotifications: PropTypes.func,
- rotation: PropTypes.number
->>>>>>> 60e4c9e9df1235501d5b1bc95a31cb0be79969b9
+ rotation: PropTypes.number,
+ toggleDistractionFreeMode: PropTypes.func
};
diff --git a/web/js/map/ui.js b/web/js/map/ui.js
index 4d1193e26..7483bad9d 100644
--- a/web/js/map/ui.js
+++ b/web/js/map/ui.js
@@ -297,6 +297,8 @@ export function mapui(models, config, store, ui) {
* @returns {void}
*/
var onResize = function() {
+ const state = store.getState();
+ const isDistractionFreeModeActive = state.ui.isDistractionFreeModeActive;
var map = self.selected;
if (map.small !== util.browser.small) {
if (util.browser.small) {
@@ -304,9 +306,11 @@ export function mapui(models, config, store, ui) {
map.removeControl(map.wv.scaleMetric);
$('#' + map.getTarget() + ' .select-wrapper').hide();
} else {
- map.addControl(map.wv.scaleImperial);
- map.addControl(map.wv.scaleMetric);
- $('#' + map.getTarget() + ' .select-wrapper').show();
+ if (!isDistractionFreeModeActive) {
+ map.addControl(map.wv.scaleImperial);
+ map.addControl(map.wv.scaleMetric);
+ $('#' + map.getTarget() + ' .select-wrapper').show();
+ }
}
}
};