#132
Zoom: on touch, a zoomed drawing stops the page from scrolling
On touch, a swipe that starts on a zoomed drawing never scrolls the page. The drawing gets touch-action: none and every swipe pans it.
Steps (Pele 1.13.0, Chromium's Pixel 7 emulation):
<!doctype html>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<div id="diagram" style="width: 320px"></div>
<div style="height: 3000px"></div>
<script src="https://cdn.jsdelivr.net/npm/pele@1.13.0/dist/pele.global.js"></script>
<script>
const source = 'flowchart TD\n Root --> A & B & C & D & E & F & G & H'
pele.mount(document.getElementById('diagram'), source, { zoom: 'auto' })
</script>- Swipe up starting on the drawing. The page scrolls (79px in my test).
- Scroll back, zoom in, and swipe the same way. The page scrolls 0px.
When a tall drawing fills the screen, the controls can be scrolled out of view, and the only way back is a double-tap, which nothing on screen tells the user about.
Expected: a swipe that pans past the drawing's edge scrolls the page, or the controls stay reachable while zoomed.
Activity
2(2) works for me. Thanks for picking it up!
Two candidate behaviors here, and they point at different fixes, so flagging before implementing so the fix matches what you want:
Edge-release scrolling: when a pan reaches the drawing's edge, the gesture hands off to the page. This needs pointer-capture release at the edge, and
touch-actionis decided at touch start, so a mid-gesture handoff is fiddly.Controls stay reachable: keep the zoom bar visible while zoomed, so Reset is always one tap away even when the drawing fills the screen.
My instinct is (2) is the smaller, safer change, and it also fixes the 'only way back is an undiscoverable double-tap' problem, while (1) is the more native-feeling scroll behavior but a bigger touch-handling change. Happy to implement whichever you prefer.