diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 8f20f7b..d3c5f37 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -144,6 +144,7 @@ function handleMouseDown(e) { pointerDown(e.clientX, e.clientY, e.target); } function handleMouseMove(e) { pointerMove(e.clientX, e.clientY, () => e.preventDefault()); } + // Mobile Touch Panning Adapters // Mobile Touch Panning Adapters function handleTouchStart(e) { if (isZoomed) { @@ -155,7 +156,7 @@ } function handleTouchMove(e) { - if (isZoomed) { + if (isZoomed && e.touches.length === 1) { // 👈 Ensures single finger panning behaves correctly const touch = e.touches[0]; pointerMove(touch.clientX, touch.clientY, () => e.preventDefault()); } @@ -217,7 +218,7 @@ onclick={(e) => { if (e.target === e.currentTarget) activePhoto = null; }} onkeydown={handleKeyDown} ontouchstart={handleTouchStart} - onttouchmove={handleTouchMove} + ontouchmove={handleTouchMove} ontouchend={handleTouchEnd} >