#130
Zoom: links in a zoomed drawing do not open
Clicking a click link in a drawing works at fit scale. Once the drawing is zoomed in, the same click does nothing. The click event's target is the document, not the <a>.
Steps (Pele 1.13.0, Chromium):
<!doctype html>
<meta charset="utf-8">
<div id="diagram" style="width: 320px"></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\n click Root "https://example.com"'
pele.mount(document.getElementById('diagram'), source, { zoom: 'auto' })
</script>- Click "Root". The link opens.
- Press Zoom in once, then click "Root" again, still in view. Nothing opens.
Expected: a click with no drag follows the link at any scale.
Likely cause: while zoomed, pointerdown calls setPointerCapture on the element, so the click is retargeted away from the link.
Activity
0No activity yet.