Interactive interface for browsing global, full-resolution satellite imagery
fix zoom & rotation buttons for mobile (#3978)
Ryan Weiler97d24d59c5e5
diff --git a/web/js/components/map/rotation.js b/web/js/components/map/rotation.jsindex edb62108b..90267b73b 100644--- a/web/js/components/map/rotation.js+++ b/web/js/components/map/rotation.js@@ -57,9 +57,10 @@ class Rotation extends React.Component {} = this.props;const currentRotation = Number(rotation * (180 / Math.PI)).toFixed();const isPolarProj = proj.id !== 'geographic' && proj.id !== 'webmerc';+ const rotationButtonClass = isMobile ? 'wv-rotation-buttons-mobile' : 'wv-rotation-buttons';return !isDistractionFreeModeActive && isPolarProj && (- <div className="wv-rotation-buttons">+ <div className={rotationButtonClass}><buttontype="button"className="wv-map-rotate-left wv-map-zoom"diff --git a/web/js/components/map/zoom.js b/web/js/components/map/zoom.jsindex ac7405e29..32f0d548a 100644--- a/web/js/components/map/zoom.js+++ b/web/js/components/map/zoom.js@@ -12,8 +12,10 @@ function Zoom({const zoomOutDisabled = zoomLevel === 0;if (!map) return null;+ const zoomButtonClass = isMobile ? 'wv-zoom-buttons-mobile' : 'wv-zoom-buttons';+return !isDistractionFreeModeActive && (- <div className="wv-zoom-buttons">+ <div className={zoomButtonClass}><buttontype="button"disabled={zoomInDisabled}diff --git a/web/scss/features/map.scss b/web/scss/features/map.scssindex 3d9f5bc46..db219116c 100644--- a/web/scss/features/map.scss+++ b/web/scss/features/map.scss@@ -99,14 +99,16 @@border-bottom-right-radius: 10px;}-@media (max-width: $mobile-max-width) {- .wv-zoom-buttons {- display: none;- }+.wv-zoom-buttons-mobile {+ display: none;+}- .wv-rotation-buttons {- top: 96px;- }+.wv-rotation-buttons-mobile {+ top: 96px;+ right: 10px;+ width: 38px;+ height: 130px;+ position: absolute;.wv-map-rotate-left,.wv-map-rotate-right {