diff --git a/web/static/main.js b/web/static/main.js index 1116ce7..1034e8b 100644 --- a/web/static/main.js +++ b/web/static/main.js @@ -471,6 +471,18 @@ function renderCanvas() { }); // Port-click drives both cable-draw (slice 7) and port-select (this fix). c.addEventListener("pointerdown", (e) => onPortPointerDown(e, prt)); + // Double-click activates cable-draw mode from this port without arming + // the cable tool first. armTool("cable") gives the crosshair cursor; + // the next port-click is then caught by onPortPointerDown's + // cable-draw-in-progress branch and commits the cable. + c.addEventListener("dblclick", (e) => { + e.stopPropagation(); + e.preventDefault(); + if (state.tool !== "cable") armTool("cable"); + state.cableDrawFromPortID = prt.id; + state.selection = null; + render(); + }); g.append(c); }