Skip to content

DiffXray v2.1.0 — Freely Draggable Blast-Radius Node & Swimlane Canvas

Choose a tag to compare

@unbridled-41 unbridled-41 released this 18 Nov 07:06
· 7 commits to main since this release
756c549

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

  1. 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 / scale so 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 4px threshold distinguishes click-to-inspect vs. drag-to-reposition.
  2. 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.
  3. Cursor-Centered Wheel Zoom, Grid Snap & Non-Destructive Layout Controls:
    • Mousewheel / trackpad scroll zooms smoothly around the cursor (0.35x–2.5x).
    • Snap: Off / 12px toggle (or hold Shift while dragging) snaps coordinates to a 12px grid.
    • Fit View frames your custom node arrangement without wiping custom positions; Reset Layout restores default swimlanes.

Verification

  • npm run check → OK: Verified 33 ESM modules (0 runtime dependencies, isomorphic boundary intact)
  • npm test → 22/22 passing
  • node ./bin/diffxray.mjs --staged --no-color → Trust Score: 100/100 (Grade A) — Clean Signal