iced_nodegraph

A node graph editor widget for iced

crates.io 0.5.0

Interaction

Connections behave like physical plugs: a dragged edge snaps to a compatible pin and on_connect fires immediately; moving away unsnaps and fires on_disconnect. Releasing while snapped keeps the connection, releasing while loose discards the drag. Treat these callbacks as live state, not a commit. A drop onto a pin the validation turns down snaps nothing, and on_connect_refused names that pair so the host can say why.

NodeGraph::snap_grid puts a dragged node's origin on a world-unit grid. The preview and the delta on_move reports are the same number, and holding Keymap::snap_override (Alt by default) suspends the snap for as long as it is held. A drag carrying several nodes shares one delta computed on the grabbed node, so a group keeps its internal layout.

A node built with Node::frame is a backdrop: it renders behind every non-frame node, answers a press only where none of them covers the point, and carries the nodes fully inside its bounds along with it. Membership is resolved from the live layout at press time, so a node dropped into a frame is carried by the next drag and the host registers nothing.

Rebindable bindings and their platform defaults are documented on Keymap; the full control scheme including mouse and touch gestures is in the repository README.

Demo: interaction
The interaction demo: typed pins with valid and rejected connections
Stored image of the interaction scene.