From 2d7eca16a74c3d307dcccaf76dfc08f76a670783 Mon Sep 17 00:00:00 2001 From: rene Date: Fri, 5 Jun 2026 10:26:35 +0200 Subject: [PATCH] MapLibre-Port 3a-Fix: Scanner-Endlosschleife (resize im Scan) + Pinch-Page-Zoom + Rotation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - _loadOsmLayers: kein _map.resize() für GL (löste move→moveend→scan-Loop aus, 'pausenlos') - _initMapGL: touchZoomRotate.disableRotation() + touchPitch.disable() + container touch-action:none → Pinch=reines Zoom, bleibt in der Karte (kein iOS-Page-Zoom), keine ungewollte Drehung --- VERSION | 2 +- backend/static/index.html | 24 ++++++++++++------------ backend/static/js/app.js | 2 +- backend/static/js/pages/map.js | 9 ++++++++- backend/static/landing.html | 2 +- backend/static/sw.js | 2 +- 6 files changed, 24 insertions(+), 17 deletions(-) diff --git a/VERSION b/VERSION index 2a9ab72..03eda3b 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1181 \ No newline at end of file +1182 \ No newline at end of file diff --git a/backend/static/index.html b/backend/static/index.html index 2886b6a..a9bde04 100644 --- a/backend/static/index.html +++ b/backend/static/index.html @@ -86,14 +86,14 @@ Ban Yaro - + - - - - - + + + + + @@ -617,11 +617,11 @@ - - - - - + + + + + @@ -631,7 +631,7 @@ - + diff --git a/backend/static/js/app.js b/backend/static/js/app.js index ddb2c36..77e40b1 100644 --- a/backend/static/js/app.js +++ b/backend/static/js/app.js @@ -3,7 +3,7 @@ Router, State-Management, Navigation, Initialisierung. ============================================================ */ -const APP_VER = '1181'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen +const APP_VER = '1182'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen const APP_VERSION = '1.6.0'; // ← semantische Version, wird bei make release gesetzt window.APP_VER = APP_VER; // global verfügbar für andere Module (z.B. offline-indicator) window.APP_VERSION = APP_VERSION; diff --git a/backend/static/js/pages/map.js b/backend/static/js/pages/map.js index 66c0b6b..469b162 100644 --- a/backend/static/js/pages/map.js +++ b/backend/static/js/pages/map.js @@ -749,6 +749,11 @@ window.Page_map = (() => { center, zoom, attributionControl: false, maxZoom: 19, dragRotate: false, pitchWithRotate: false, }); + // Zwei-Finger-Rotation aus → Pinch ist reines Zoom (weniger moveend, klarere Geste). + _map.touchZoomRotate.disableRotation(); + _map.touchPitch.disable(); + // Pinch bleibt in der Karte (verhindert iOS-Page-Zoom), ohne globales user-scalable=no. + el.style.touchAction = 'none'; _map.addControl(new maplibregl.NavigationControl({ showCompass: false }), 'top-left'); _map.addControl(new maplibregl.ScaleControl()); _map.addControl(new maplibregl.AttributionControl({ @@ -1274,7 +1279,9 @@ window.Page_map = (() => { } _overpassActive = true; - _mapResize(); + // GL: KEIN resize() im Scan — MapLibre würde dadurch move/moveend feuern → + // triggert den Scan erneut → Endlosschleife. invalidateSize ist eine Leaflet-Eigenheit. + if (!_engineGL) _mapResize(); let bbox; if (_engineGL) { const p = _mapPaddedBounds(0.15); diff --git a/backend/static/landing.html b/backend/static/landing.html index e94dbd7..6de5e54 100644 --- a/backend/static/landing.html +++ b/backend/static/landing.html @@ -4,7 +4,7 @@ - + Ban Yaro — Die Hunde-App für Deutschland, Österreich & Schweiz diff --git a/backend/static/sw.js b/backend/static/sw.js index cbb0010..6ac0e29 100644 --- a/backend/static/sw.js +++ b/backend/static/sw.js @@ -4,7 +4,7 @@ ============================================================ */ // ← EINZIGE Stelle für die Version — STATIC_ASSETS und CACHE_VERSION leiten sich ab -const VER = '1181'; +const VER = '1182'; const CACHE_VERSION = `by-v${VER}`; const CACHE_STATIC = `${CACHE_VERSION}-static`; const CACHE_TILES = 'ban-yaro-tiles-v1'; // bleibt über SW-Updates erhalten