iced_nodegraph

A node graph editor widget for iced

crates.io 0.5.0

Nesting

A NodeGraph is an ordinary element and can be a node's body. Each graph keeps its own camera, selection and drag state and reports through its own callbacks; its Ids need not match the enclosing graph's.

Give the nested graph an explicit size (.width(Length::Fixed(..)) and .height(..), or a sized container). Node bodies are laid out against unbounded limits, so the default Length::Fill resolves to an infinite graph, which debug builds reject at layout like any other infinite body.

The inner canvas takes the presses and wheel ticks that land on it; the containing node is moved by a body region outside the inner graph, such as a title bar. Keyboard shortcuts resolve innermost-first; disable bindings on one graph's Keymap to route them to the other.

The inner graph's pins are its own: the outer graph never connects to them. Nested state lives with the node index like any other body state.