From b21a306790bb6a6482e9711b65d1e8c4a498c148 Mon Sep 17 00:00:00 2001 From: Brian Smith Date: Sat, 12 Sep 2026 11:35:31 -0700 Subject: [PATCH] fix(map): enable fluid mobile pinch-to-zoom and tactile zoom controls without GPS follow lock (v20) --- css/styles.css | 84 +++++++++++++++++++++++++++++++++++- index.html | 16 ++++--- js/radar.js | 114 +++++++++++++++++++++++++++++++++++++++++-------- sw.js | 26 +++++------ 4 files changed, 202 insertions(+), 38 deletions(-) diff --git a/css/styles.css b/css/styles.css index d60bcda..22d1cfd 100644 --- a/css/styles.css +++ b/css/styles.css @@ -2661,9 +2661,51 @@ body { display: none; } - /* Leaflet Controls minimal */ + /* Tactile Mobile Zoom Controls (+ / -) */ + .leaflet-bottom.leaflet-left { + bottom: max(75px, calc(15px + env(safe-area-inset-bottom))) !important; + left: 12px !important; + z-index: 800 !important; + margin: 0 !important; + } + .leaflet-control-zoom { - display: none !important; /* Touch pinch-to-zoom is native */ + display: flex !important; + flex-direction: column !important; + border: none !important; + box-shadow: 0 4px 18px rgba(0, 0, 0, 0.65) !important; + border-radius: 12px !important; + overflow: hidden !important; + background: rgba(15, 23, 42, 0.92) !important; + backdrop-filter: blur(12px) !important; + -webkit-backdrop-filter: blur(12px) !important; + border: 1px solid rgba(56, 189, 248, 0.35) !important; + } + + .leaflet-control-zoom a { + background: transparent !important; + color: #38bdf8 !important; + border: none !important; + border-bottom: 1px solid rgba(56, 189, 248, 0.15) !important; + width: 38px !important; + height: 38px !important; + line-height: 38px !important; + font-size: 20px !important; + font-weight: 700 !important; + display: flex !important; + align-items: center !important; + justify-content: center !important; + text-decoration: none !important; + } + + .leaflet-control-zoom a:last-child { + border-bottom: none !important; + } + + .leaflet-control-zoom a:hover, + .leaflet-control-zoom a:active { + background: rgba(56, 189, 248, 0.25) !important; + color: #ffffff !important; } /* Native Mobile Bottom Sheet for all Modals */ @@ -2725,6 +2767,44 @@ body { color: #38bdf8 !important; } +.leaflet-control-zoom { + border: none !important; + box-shadow: 0 4px 18px rgba(0, 0, 0, 0.65) !important; + border-radius: 12px !important; + overflow: hidden !important; + background: rgba(15, 23, 42, 0.9) !important; + backdrop-filter: blur(12px) !important; + -webkit-backdrop-filter: blur(12px) !important; + border: 1px solid rgba(56, 189, 248, 0.35) !important; +} + +.leaflet-control-zoom a { + background: transparent !important; + color: #38bdf8 !important; + border: none !important; + border-bottom: 1px solid rgba(56, 189, 248, 0.15) !important; + width: 36px !important; + height: 36px !important; + line-height: 36px !important; + font-size: 18px !important; + font-weight: 700 !important; + transition: all 0.15s ease !important; + display: flex !important; + align-items: center !important; + justify-content: center !important; + text-decoration: none !important; +} + +.leaflet-control-zoom a:last-child { + border-bottom: none !important; +} + +.leaflet-control-zoom a:hover, +.leaflet-control-zoom a:active { + background: rgba(56, 189, 248, 0.25) !important; + color: #ffffff !important; +} + /* ========================================================================== 5% DRIVING APP UPGRADES: RADAR GAUGE, 1-TAP FAB, RECENTER, SENSITIVITY ========================================================================== */ diff --git a/index.html b/index.html index 80397b6..6270158 100644 --- a/index.html +++ b/index.html @@ -54,7 +54,7 @@ - + @@ -283,6 +283,10 @@ West AV +