Hierarchy — rataflow

rataflow

GitHubdocs.rscrates.io
examples/hierarchy.rs ↗

Parent-child node relationships with relative positioning.

Child positions are relative to their parent's top-left corner. Demonstrates nesting, multi-level hierarchy, NodeExtent::Parent, and expand_parent (parent auto-grows to contain child).

Select a node to see both numbers at the bottom: the position it stores, and the absolute bounds Flow::node_bounds resolves it to. For a root node they agree; for a nested child they do not, which is the whole point of the query — persisting or hit-testing a hierarchy needs the resolved answer, and walking the parent chain by hand is how that answer drifts out of sync.

  • Drag node body to move it
  • Drag from source handle (right side) to create edges
  • Drag on empty space to pan the canvas