Interactive interface for browsing global, full-resolution satellite imagery
remove jquery-ui styles. fix zoom button disable
Jason Kentaf6904ef90ab
diff --git a/web/css/jquery-ui-override.css b/web/css/jquery-ui-override.cssdeleted file mode 100644index 95c19663f..000000000--- a/web/css/jquery-ui-override.css+++ /dev/null@@ -1,282 +0,0 @@-/*- * Default jquery-ui button- */--a.ui-button.ui-state-default {- color: #eee;- font-weight: 700;- border: 1px solid #666;- font-size: 1em;- background-image: linear-gradient(#555, #666);- background-image: -ms-linear-gradient(#555, #666);- background-image: -o-linear-gradient(#555, #666);- font-family: 'Segoe UI', 'Arial', sans-serif;-}--a.ui-button.ui-state-default.ui-state-hover {- border-color: #eee;- background-color: #eee;- background-image: none;- color: #404040;-}--.ui-button.ui-state-disabled {- pointer-events: auto;-}--.ui-button {- padding: 0;- color: #eee;-}--.wv-menu-item-selected {- background: #888;- color: #eee;-}--.ui-menu {- position: absolute;- width: 150px;- padding: 0;- z-index: 1000;-}--/* Allow Font Awesome Icons in lieu of jQuery UI and only apply when using a FA icon- * Remove the jQuery UI Icon- * Remove the jQuery UI Text Indent- */-.ui-icon[class*=' fa-'] {- background: none repeat scroll 0 0 transparent;- text-indent: 0;-}--.ui-button-icon-only .ui-icon[class*=' fa-'] {- margin-left: -7px;-}--.ui-widget.ui-widget-content {- border: 0;-}--.ui-widget-content {- color: #fff;- background: rgb(40, 40, 40);- border: 0;- border-radius: 0;-}--.ui-widget-content.wv-opaque {- background: #222;-}--.ui-dialog {- padding: 0;- z-index: 600;-}--.ui-dialog .ui-dialog-titlebar {- padding: 0.4em 1em;- border: 1px solid #333;-}--.ui-dialog .ui-dialog-content {- color: #fff;- background-image: none;- padding-top: 15px;- padding-bottom: 15px;-}--.ui-corner-all {- border-radius: 0;-}--button.ui-button:focus .ui-icon-closethick,-button.ui-button .ui-icon-closethick {- background-position: 0 0;- background-image: url('../images/close.png');-}--button.ui-button:hover .ui-icon-closethick {- background-position: 0 0;- background-image: url('../images/close-highlight.png');-}--.ui-tooltip {- background: #eee;-}--.ui-tooltip-content {- color: #000;-}--.link,-.ui-widget-content a,-a {- color: #7bf;- text-decoration: none;- cursor: pointer;-}--.link:hover,-a:hover {- color: #9df;-}--.ui-menu-item a {- color: #fff;-}--.ui-accordion .ui-accordion-content {- background: rgba(0, 0, 0, 0);-}--.error-icon {- margin-right: 10px;- vertical-align: middle;-}--.error-header {- margin-top: 5px;-}--.error-body {- margin-top: 10px;-}--.ui-menu-item {- font-size: 13px;-}--.ui-menu-item i {- font-size: 13px;-}--label {- -webkit-user-select: none;- -moz-user-select: none;- -ms-user-select: none;- user-select: none;-}--.wv-panel {- border: 1px solid #333;- box-sizing: content-box;-}--.wv-panel .ui-dialog-titlebar {- background: rgb(40, 40, 40);- border: 0;- border-bottom-left-radius: 0;- border-bottom-right-radius: 0;-}--.ui-widget-overlay {- background: #000;- opacity: 0.4;-}--.ui-widget-header {- color: #fff;- background: rgb(40, 40, 40);-}--.ui-widget-header .ui-button {- background: none transparent;- border: 0;-}--.ui-widget-header .ui-button:hover {- background: #fff;-}--.wv-panel .ui-dialog-content {- padding: 0 1em 1em;-}--.wv-panel .ui-dialog-title {- font-weight: 400;- color: #fff;-}--/* style for UI dialog buttons that are hovered over */-.ui-widget-content .ui-state-hover {- border-color: #eee;- background-color: #eee;- background-image: none;- color: #404040;-}--/* style for UI info select menu that are hovered over */-.ui-widget-content .ui-state-focus {- border-color: #eee;- background-color: #eee;- background-image: none;- color: #404040;-}--.ui-widget-content .ui-state-focus.ui-menu-item a {- color: #404040;-}--.ui-state-focus:focus {- outline: none !important;-}--.ui-state-focus a:focus {- outline: none !important;-}--.ui-widget-content .ui-dialog-titlebar-close.ui-state-focus {- background: none;-}--.ui-visual-focus {- -webkit-box-shadow: none;- box-shadow: none;-}--.ui-button.ui-state-active:hover,-.ui-button:active,-.ui-state-active,-.ui-widget-content .ui-state-active,-.ui-widget-header .ui-state-active,-a.ui-button:active {- font-weight: 300;- border: 0;- background: transparent;-}--.ui-dialog-buttonpane .ui-dialog-buttonset .ui-button {- padding: 0.4em 1em;- border: 1px solid #666;- background: #242424;- font-weight: 700;- color: #eee;-}--.ui-dialog-buttonpane .ui-dialog-buttonset .ui-button:hover {- border-color: #eee;- background-color: #eee;- background-image: none;- color: #404040;-}--/* Counter intuitive override: All OpenLayers overlays get the-ol-selectable class added automatically, but we don't want map markers-or dateline overlays to be selectable. */-.ol-selectable {- -webkit-user-select: none !important;- -moz-user-select: none !important;- -ms-user-select: none !important;- user-select: none !important;-}--.wv-map-zoom:focus,-.wv-map-zoom.ui-button.ui-state-disabled:hover {- border: 1px solid #333;- color: #eeee;- background-color: rgba(40, 40, 40, 0.85);-}-#wv-toolbar .ui-button.ui-state-disabled:hover {- color: #eeee;-}diff --git a/web/css/map.css b/web/css/map.cssindex 155141acc..065e5d8c7 100644--- a/web/css/map.css+++ b/web/css/map.css@@ -16,6 +16,23 @@background: none rgba(40, 40, 40, 0.85);border: 1px solid #333;margin-right: 0;+ border-radius: 0;+ padding: 0;+ color: #eee;+ &:hover {+ background-color: #fff;+ color: #1a1a1a;+ border: 1px solid #333;+ }+ &[disabled] {+ background: #ccc;+ color: #888;+ &:hover {+ background-color: #ccc;+ color: #666;+ cursor: not-allowed;+ }+ }}.wv-map-zoom.ui-button-click-prevent {@@ -35,12 +52,6 @@height: 37px;}-.wv-map-zoom:hover {- background-color: #fff;- color: #1a1a1a;- border: 1px solid #333;-}-.wv-map-zoom-in {top: 150px;border-top-left-radius: 10px;@@ -97,11 +108,9 @@/* handle rotation and zoom button placement on large landscape device (like iPhone X) */@media only screen and (max-device-width: 980px) and (max-device-height: 600px) and (orientation: landscape),(max-height: 600px) {- div[data-proj='arctic'] .wv-map-zoom-in,- div[data-proj='antarctic'] .wv-map-zoom-in,- div[data-proj='arctic'] .wv-map-zoom-out,- div[data-proj='antarctic'] .wv-map-zoom-out, {- right: 54px;+ .wv-map-zoom-in,+ .wv-map-zoom-out, {+ display: none;}.wv-map-zoom-in {top: 58px;diff --git a/web/images/close-highlight.png b/web/images/close-highlight.pngdeleted file mode 100644index e9a6b89cb..000000000Binary files a/web/images/close-highlight.png and /dev/null differdiff --git a/web/images/close.png b/web/images/close.pngdeleted file mode 100644index 98b116605..000000000Binary files a/web/images/close.png and /dev/null differdiff --git a/web/images/wv-icons.png b/web/images/wv-icons.pngdeleted file mode 100644index 421d1f5ed..000000000Binary files a/web/images/wv-icons.png and /dev/null differdiff --git a/web/js/app.js b/web/js/app.jsindex 204d28a10..0e649b6b4 100644--- a/web/js/app.js+++ b/web/js/app.js@@ -46,7 +46,6 @@ import '../css/fonts.css';import '../css/alert.css';import '../css/reset.css';import '../css/compare.css';-import '../css/jquery-ui-override.css';import '../css/search-ui-override.css';import '../css/rc-slider-overrides.css';import '../css/react-joyride-override.css';diff --git a/web/js/components/map/rotation.js b/web/js/components/map/rotation.jsindex 9ebd33b74..83780e72c 100644--- a/web/js/components/map/rotation.js+++ b/web/js/components/map/rotation.js@@ -59,7 +59,7 @@ class Rotation extends React.Component {<><buttontype="button"- className="wv-map-rotate-left wv-map-zoom ui-button ui-corner-all ui-widget"+ className="wv-map-rotate-left wv-map-zoom"title="You may also rotate by holding Alt and dragging the mouse"onMouseDown={() => { this.rotateOnClick(10); }}onMouseUp={this.clearInterval}@@ -71,7 +71,7 @@ class Rotation extends React.Component {<buttontype="button"- className="wv-map-reset-rotation wv-map-zoom ui-button ui-corner-all ui-widget"+ className="wv-map-reset-rotation wv-map-zoom"title="Reset rotation"onMouseDown={this.resetRotation}onMouseUp={this.clearInterval}@@ -83,7 +83,7 @@ class Rotation extends React.Component {<buttontype="button"- className="wv-map-rotate-right wv-map-zoom ui-button ui-corner-all ui-widget"+ className="wv-map-rotate-right wv-map-zoom"title="You may also rotate by holding Alt and dragging the mouse"onMouseDown={() => { this.rotateOnClick(-10); }}onMouseUp={this.clearInterval}diff --git a/web/js/components/map/zoom.js b/web/js/components/map/zoom.jsindex b3b9926da..d2e9c0bdb 100644--- a/web/js/components/map/zoom.js+++ b/web/js/components/map/zoom.js@@ -4,42 +4,44 @@ import { connect } from 'react-redux';import PropTypes from 'prop-types';import { mapUtilZoomAction } from '../../map/util';-function Zoom({ map, proj, isDistractionFreeModeActive }) {+function Zoom({+ map, zoomLevel, numZoomLevels, isDistractionFreeModeActive,+}) {if (!map) return null;- const zoomLevel = map.getView().getZoom();- const { numZoomLevels } = proj;return !isDistractionFreeModeActive && (<><buttontype="button"disabled={zoomLevel === numZoomLevels}- className="wv-map-zoom wv-map-zoom-in ui-button ui-corner-all ui-widget"+ className="wv-map-zoom wv-map-zoom-in"title="Zoom in view."onClick={() => { mapUtilZoomAction(map, 1); }}onMouseMove={(e) => e.stopPropagation()}><FontAwesomeIcon icon="plus" /></button>- <div+ <buttontype="button"disabled={zoomLevel === 0}- className="wv-map-zoom wv-map-zoom-out ui-button ui-corner-all ui-widget"+ className="wv-map-zoom wv-map-zoom-out"title="Zoom out view."onClick={() => { mapUtilZoomAction(map, -1); }}onMouseMove={(e) => e.stopPropagation()}><FontAwesomeIcon icon="minus" />- </div>+ </button></>);}const mapStateToProps = (state) => {const { map, proj, ui } = state;+ const activeMap = map.ui.selected;return {- map: map.ui.selected,- proj,+ map: activeMap,+ zoomLevel: activeMap && activeMap.getView().getZoom(),+ numZoomLevels: proj.selected.numZoomLevels,isDistractionFreeModeActive: ui.isDistractionFreeModeActive,};};@@ -47,7 +49,8 @@ const mapStateToProps = (state) => {Zoom.propTypes = {map: PropTypes.object,isDistractionFreeModeActive: PropTypes.bool,- proj: PropTypes.object,+ numZoomLevels: PropTypes.number,+ zoomLevel: PropTypes.number,};export default connect(