Fix: Swipe-Begrenzung — kein Überziehen über erste/letzte Welt, SW by-v649
This commit is contained in:
parent
bb8ceaf114
commit
87d3006aa7
4 changed files with 10 additions and 8 deletions
|
|
@ -3,7 +3,7 @@
|
|||
Router, State-Management, Navigation, Initialisierung.
|
||||
============================================================ */
|
||||
|
||||
const APP_VER = '648'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen
|
||||
const APP_VER = '649'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen
|
||||
const APP_VERSION = '1.2.1'; // ← semantische Version, wird bei make release gesetzt
|
||||
const IS_STAGING = location.hostname === 'staging.banyaro.app';
|
||||
|
||||
|
|
|
|||
|
|
@ -109,9 +109,11 @@ window.Worlds = (() => {
|
|||
if (_t.vert === null) _t.vert = Math.abs(dy) > Math.abs(dx) + 4;
|
||||
if (_t.vert) return;
|
||||
e.preventDefault();
|
||||
_t.moved = dx;
|
||||
// Nicht über erste/letzte Seite hinausziehen
|
||||
const cdx = _cur === 0 ? Math.min(0, dx) : _cur === 2 ? Math.max(0, dx) : dx;
|
||||
_t.moved = cdx;
|
||||
const base = -_cur * (100 / 3);
|
||||
track.style.transform = `translateX(calc(${base}% + ${dx}px))`;
|
||||
track.style.transform = `translateX(calc(${base}% + ${cdx}px))`;
|
||||
}, { passive: false });
|
||||
|
||||
track.addEventListener('touchend', () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue