Repository navigation
DiffXray v2.1.0 — Freely Draggable Blast-Radius Node & Swimlane Canvas
Summary
Closes #25
Upgrades the Blast-Radius Map (v2.1.0) in src/renderers/html-studio.mjs and the Live Web Studio (site/index.html) into a freely draggable interactive node & swimlane canvas.
What Changed
- 60fps Pointer-Capture Free Dragging on Nodes & Swimlanes:
- Every module node card (
.g-node) can be freely dragged anywhere on the 2D dot-grid canvas (setPointerCapture,dx / scale,dy / scaleso drag tracking is 1:1 at any zoom level, automatic z-order elevation, and tactile 6-dot drag handles). - Every swimlane header pill (
.g-lane—UNTOUCHED CALLERS,ENTRYPOINTS & API,CORE LOGIC,DATA, CONFIG & TESTS) is also draggable as a group handle, moving the entire column of nodes together. - Clean
4pxthreshold distinguishes click-to-inspect vs. drag-to-reposition.
- Every module node card (
- Smart 4-Side Port Routing & Directional Arrowheads (
computeSmartEdgePath):- Connected cubic Bézier curves dynamically select Right, Left, Bottom, or Top ports based on live relative coordinates (fixing vertical/same-column connections and gracefully flipping sides when dragging nodes across columns) with color-coded
<marker>arrowheads and hover/selection path highlighting.
- Connected cubic Bézier curves dynamically select Right, Left, Bottom, or Top ports based on live relative coordinates (fixing vertical/same-column connections and gracefully flipping sides when dragging nodes across columns) with color-coded
- Cursor-Centered Wheel Zoom, Grid Snap & Non-Destructive Layout Controls:
- Mousewheel / trackpad scroll zooms smoothly around the cursor (
0.35x–2.5x). Snap: Off / 12pxtoggle (or holdShiftwhile dragging) snaps coordinates to a12pxgrid.Fit Viewframes your custom node arrangement without wiping custom positions;Reset Layoutrestores default swimlanes.
- Mousewheel / trackpad scroll zooms smoothly around the cursor (
Verification
npm run check→OK: Verified 33 ESM modules (0 runtime dependencies, isomorphic boundary intact)npm test→22/22passingnode ./bin/diffxray.mjs --staged --no-color→ Trust Score: 100/100 (Grade A) — Clean Signal