Subflow
Nodes nested in group containers through ParentId, with a group nested inside another. A child is positioned relative to its parent and moves with it; with ExtentParent it also cannot be dragged out of it.
Press Tab to move between the nodes and edges of the diagram.
Press Enter or Space to select it, Shift with Enter to add it to the selection, the arrow keys to move the selected nodes, Delete to remove them and Escape to clear the selection. Press C to start a connection from it.
Press Enter or Space to select it, Delete to remove it and Escape to clear the selection. Press C to move its end to another node.
bit BlowTry it
- Drag a group by its background: its children move with it. Dragging Group B carries Group C, and C's child, along too.
- Drag a child towards its group's border: it stops there. Group C is itself a child of Group B, so it stops at B's border.
- Untick keep children inside their group and drag a child out: it leaves the box, yet still moves with its group -
ParentId, not where a node sits, decides what it belongs to. - Shift+drag a box around a group and its children, then drag them: each child moves once, together with its parent.
How it works
- A node with
ParentIdis a child: itsPositionis relative to the parent's top-left corner, and it moves when the parent does. Type = "group"is the built-in look for a container - translucent and dashed, its label in the corner, no handles - but any node can be a parent, and groups nest: Group C is a child of Group B. Each group here gets a tint through itsStyle.ExtentParent = truekeeps a child inside its parent's box, by pointer and by arrow keys alike; the checkbox sets it on every child.- With the default
ZIndexMode.Auto, deeper nodes are drawn after shallower ones, so a child is never hidden behind its group. - Edges are drawn beneath every node, children included, which is why the groups are translucent: an opaque one would hide the edges running inside it.