diff --git a/backend/static/css/components.css b/backend/static/css/components.css index 6d8c002..cc27dc0 100644 --- a/backend/static/css/components.css +++ b/backend/static/css/components.css @@ -4616,6 +4616,8 @@ textarea.form-control { pointer-events: all; user-select: none; -webkit-user-drag: none; + -webkit-touch-callout: none; + touch-action: none; } .photo-editor-empty { font-size: 5rem; color: var(--c-text-secondary); } .photo-editor-controls { width: 100%; } diff --git a/backend/static/js/app.js b/backend/static/js/app.js index 2a7a03d..a605ad9 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 = '120'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen +const APP_VER = '122'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen const App = (() => { diff --git a/backend/static/js/pages/dog-profile.js b/backend/static/js/pages/dog-profile.js index 8bd04bb..29eabfc 100644 --- a/backend/static/js/pages/dog-profile.js +++ b/backend/static/js/pages/dog-profile.js @@ -81,11 +81,11 @@ window.Page_dog_profile = (() => { ${dog.foto_url ? `
${_esc(dog.name)} + style="transform:scale(${dog.foto_zoom||1}) translate(${dog.foto_offset_x||0}%,${dog.foto_offset_y||0}%)">
` : `
${UI.icon('dog')}
`} - @@ -284,7 +284,8 @@ window.Page_dog_profile = (() => {
${hasPhoto ? `` + oncontextmenu="return false" + style="transform:scale(${zoom}) translate(${ox}%,${oy}%)">` : `
${UI.icon('dog')}
`}
${hasPhoto ? ` @@ -314,8 +315,11 @@ window.Page_dog_profile = (() => { const img = document.getElementById('pe-img'); const zoomSlider = document.getElementById('pe-zoom'); + // Offsets in % des Preview-Containers (200px) — konsistent mit Profil-Anzeige + const PREVIEW_PX = 200; + function _applyTransform() { - if (img) img.style.transform = `scale(${_zoom}) translate(${_ox}px,${_oy}px)`; + if (img) img.style.transform = `scale(${_zoom}) translate(${_ox}%,${_oy}%)`; } // Zoom-Slider @@ -336,8 +340,9 @@ window.Page_dog_profile = (() => { }); img.addEventListener('pointermove', e => { if (!_dragging) return; - _ox = _baseX + (e.clientX - _startX) / _zoom; - _oy = _baseY + (e.clientY - _startY) / _zoom; + // Pixel-Delta → Prozent des Preview-Containers, korrigiert um Zoom + _ox = _baseX + (e.clientX - _startX) / (PREVIEW_PX / 100) / _zoom; + _oy = _baseY + (e.clientY - _startY) / (PREVIEW_PX / 100) / _zoom; _applyTransform(); }); img.addEventListener('pointerup', () => { _dragging = false; }); diff --git a/backend/static/sw.js b/backend/static/sw.js index 9c199a2..4c0cf89 100644 --- a/backend/static/sw.js +++ b/backend/static/sw.js @@ -3,7 +3,7 @@ Offline-Cache + Push Notifications + Tile-Cache ============================================================ */ -const CACHE_VERSION = 'by-v148'; +const CACHE_VERSION = 'by-v149'; const CACHE_STATIC = `${CACHE_VERSION}-static`; const CACHE_TILES = 'ban-yaro-tiles-v1'; // bleibt über SW-Updates erhalten