Dragging an edge now rings the port it would connect to and snaps the line there. A drop on a node's body takes that node's first free compatible port, or the last compatible one when none is free, replacing its link. A drop into empty space opens the palette filtered to the node types the edge could reach at all, and the picked node arrives wired - node and link as one undo step, so a single undo takes back the whole gesture. The decision of what fits what lives in core/graph/dropTarget.ts as pure functions, tested directly; the canvas only draws the answer. The palette takes an optional filter rather than knowing about drags. Verified remote on the Windows box (GPU): ALL PASSED, 284 checks.
10 lines
319 B
TypeScript
10 lines
319 B
TypeScript
// Importing the graph package registers the built-in node set as a side effect.
|
|
import './nodes';
|
|
|
|
export * from './dropTarget';
|
|
export * from './Graph';
|
|
export * from './NodeContext';
|
|
export * from './NodeRegistry';
|
|
export * from './values';
|
|
export { GraphInterpreter, type TraceListener } from './GraphInterpreter';
|