diff options
| author | tv <tv@krebsco.de> | 2026-10-31 22:45:15 +0100 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-10-31 22:45:15 +0100 |
| commit | 3c7e1d28eee39112b9cda47cd87c331e674218b5 (patch) | |
| tree | c7f6bb540147cdab008ed4b48f29ca2ad9839bff | |
| parent | 93bba3263d16d2b27fbc93ae57546e8c14faf8e4 (diff) | |
dashboard: double-click on graph doesn't reset
| -rw-r--r-- | src/api/dashboard/dashboard.html | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/src/api/dashboard/dashboard.html b/src/api/dashboard/dashboard.html index 6e4b1a0..e584f48 100644 --- a/src/api/dashboard/dashboard.html +++ b/src/api/dashboard/dashboard.html @@ -168,8 +168,8 @@ </div> <div class="legend" id="legend"></div> <div class="legend"> - <span class="hint">drag to pan, wheel or pinch to zoom, turn with two fingers, - double-click to reset; drag a node to pin it, double-click it to let go</span> + <span class="hint">drag to pan, wheel or pinch to zoom, turn with two fingers; + drag a node to pin it, double-click it to let go</span> </div> </div> <svg id="graph"><g id="view"></g></svg> @@ -1348,14 +1348,6 @@ function unpin(id) { renderGraph(); settle(); } -// A double-click beside the nodes: the whole map again. -graph.addEventListener("dblclick", event => { - // Not one on a node (`drag`), which the browser gives the map. - if (event.target !== graph || performance.now() - lastNodeClick.at < DOUBLE_CLICK_MS) return; - Object.assign(view, { x: 0, y: 0, k: 1, turn: 0 }); - moveView(); - if (state) renderGraph(); -}); // Beside the nodes, or off the map: nothing hovered (the element left may be gone). graph.addEventListener("mousemove", event => { if (event.target === graph) hover(null); }); graph.addEventListener("mouseleave", () => hover(null)); |
