Interactive interface for browsing global, full-resolution satellite imagery
put zoom and rotation buttons into a container
Jason Kentb5550d9aeca7
diff --git a/web/css/map.css b/web/css/map.cssindex b232c3fd8..5d73f079e 100644--- a/web/css/map.css+++ b/web/css/map.css@@ -10,8 +10,8 @@}.wv-map-zoom {- right: 10px;position: absolute;+ right: 0;z-index: 1;background: none rgba(40, 40, 40, 0.85);border: 1px solid #333;@@ -35,6 +35,21 @@}}+.wv-zoom-buttons {+ top: 150px;+ right: 10px;+ position: absolute;+ height: 78px;+ width: 38px;+}+.wv-rotation-buttons {+ top: 251px;+ right: 10px;+ width: 38px;+ height: 130px;+ position: absolute;+}+.wv-map-zoom.ui-button-click-prevent {pointer-events: none;}@@ -53,110 +68,78 @@}.wv-map-zoom-in {- top: 150px;border-top-left-radius: 10px;border-top-right-radius: 10px;}.wv-map-zoom-out {- top: 188px;+ top: 38px;border-bottom-left-radius: 10px;border-bottom-right-radius: 10px;}.wv-map-reset-rotation {- top: 290px;+ top: 39px;border: 1px solid #333;height: 54px;width: 38px;}.wv-map-rotate-left {- top: 251px;border-top-left-radius: 10px;border-top-right-radius: 10px;}.wv-map-rotate-right {- top: 344px;+ top: 91px;border-bottom-left-radius: 10px;border-bottom-right-radius: 10px;}@media (max-width: 768px) {- .wv-map-zoom-in,- .wv-map-zoom-out {+ .wv-zoom-buttons, {display: none;}- .wv-map-rotate-left {+ .wv-rotation-buttons {top: 96px;}- .wv-map-rotate-right {- top: 187px;- }.wv-map-rotate-left svg.svg-inline--fa,.wv-map-rotate-right svg.svg-inline--fa {width: 47px;padding: 8px;}.wv-map-reset-rotation {- top: 134px;font-size: 1.35em;width: 49px;}}@media (max-height: 667px) {- .wv-map-zoom-in {+ .wv-zoom-buttons, {top: calc(var(--vh, 1vh) * 100 - 516px);}- .wv-map-zoom-out {- top: calc(var(--vh, 1vh) * 100 - 478px);- }- .wv-map-rotate-left {+ .wv-rotation-buttons {top: calc(var(--vh, 1vh) * 100 - 415px);}- .wv-map-reset-rotation {- top: calc(var(--vh, 1vh) * 100 - 376px);- }- .wv-map-rotate-right {- top: calc(var(--vh, 1vh) * 100 - 322px);- }}@media (max-height: 578px) {- .wv-map-zoom-in {+ .wv-zoom-buttons, {top: 58px;}- .wv-map-zoom-out {- top: 96px;- }- .wv-map-rotate-left {+ .wv-rotation-buttons{top: 160px;}- .wv-map-reset-rotation {- top: 198px;- }- .wv-map-rotate-right {- top: 251px;- }}/* handle rotation and zoom button placement on large landscape device (like iPhone X) */@media only screen and (max-device-height: 375px) and (orientation: landscape) {- .wv-map-zoom-in,- .wv-map-zoom-out, {+ .wv-zoom-buttons {display: none;}- .wv-map-rotate-left {+ .wv-rotation-buttons {top: 58px;}- .wv-map-reset-rotation {- top: 96px;- }- .wv-map-rotate-right {- top: 149px;- }}.wv-map-scale-imperial,diff --git a/web/js/components/map/rotation.js b/web/js/components/map/rotation.jsindex 83780e72c..3f8192380 100644--- a/web/js/components/map/rotation.js+++ b/web/js/components/map/rotation.js@@ -56,7 +56,7 @@ class Rotation extends React.Component {const isPolarProj = proj.id !== 'geographic' && proj.id !== 'webmerc';return !isDistractionFreeModeActive && isPolarProj && (- <>+ <div className="wv-rotation-buttons"><buttontype="button"className="wv-map-rotate-left wv-map-zoom"@@ -92,7 +92,7 @@ class Rotation extends React.Component {><FontAwesomeIcon icon="redo" className="cursor-pointer" /></button>- </>+ </div>);}}diff --git a/web/js/components/map/zoom.js b/web/js/components/map/zoom.jsindex d2e9c0bdb..57e9d166b 100644--- a/web/js/components/map/zoom.js+++ b/web/js/components/map/zoom.js@@ -10,7 +10,7 @@ function Zoom({if (!map) return null;return !isDistractionFreeModeActive && (- <>+ <div className="wv-zoom-buttons"><buttontype="button"disabled={zoomLevel === numZoomLevels}@@ -31,7 +31,7 @@ function Zoom({><FontAwesomeIcon icon="minus" /></button>- </>+ </div>);}