Interactive interface for browsing global, full-resolution satellite imagery
do not display tooltips if buttons disabled
Ed Plato27ae1e76f80d
diff --git a/web/js/components/map/zoom.js b/web/js/components/map/zoom.jsindex 7d8485bad..aa988dc60 100644--- a/web/js/components/map/zoom.js+++ b/web/js/components/map/zoom.js@@ -8,38 +8,44 @@ import HoverTooltip from '../util/hover-tooltip';function Zoom({map, zoomLevel, numZoomLevels, isDistractionFreeModeActive, isMobile,}) {+ const zoomInDisabled = zoomLevel === numZoomLevels;+ const zoomOutDisabled = zoomLevel === 0;if (!map) return null;return !isDistractionFreeModeActive && (<div className="wv-zoom-buttons"><buttontype="button"- disabled={zoomLevel === numZoomLevels}+ disabled={zoomInDisabled}className="wv-map-zoom wv-map-zoom-in"onClick={() => { mapUtilZoomAction(map, 1); }}onMouseMove={(e) => e.stopPropagation()}>+ {!zoomInDisabled && (<HoverTooltipisMobile={isMobile}labelText="Zoom in view"placement="left"target=".wv-map-zoom-in"/>+ )}<FontAwesomeIcon icon="plus" /></button><buttontype="button"- disabled={zoomLevel === 0}+ disabled={zoomOutDisabled}className="wv-map-zoom wv-map-zoom-out"onClick={() => { mapUtilZoomAction(map, -1); }}onMouseMove={(e) => e.stopPropagation()}>+ {!zoomOutDisabled && (<HoverTooltipisMobile={isMobile}labelText="Zoom out view"placement="left"target=".wv-map-zoom-out"/>+ )}<FontAwesomeIcon icon="minus" /></button></div>