Tree Layout Demo
Demonstrates the tree layout style and the different ways in which this layout can arrange
a node and its children.
With tree layout, each node can have a separate
ISubtreePlacer which is responsible for the arrangement of its children in
a certain style.
Configure the Subtree Placers
You can configure the subtree placer of the selected nodes in the right side panel.
Changing an option in the panel immediately updates the layout of the graph. A preview
demonstrates the chosen subtree style in a smaller context.
- Some subtree placers offer rotation and mirroring of the subtree.
-
Toggle the Assistant marking for a single node by double-clicking on
it. They will show their effect when their parent node has
AssistantSubtreePlacer assigned.
-
SingleLayerSubtreePlacer is used for nodes without an explicit
assignment.
Sample Graphs
Change the Graph
Changing the graph in this demo will keep its tree structure intact, and each change will
trigger a layout calculation.
- Add nodes (and edges) by dragging from an unselected node.
-
Removing selected nodes will remove their whole subtrees. The root node cannot be
deleted.
- Resize nodes to see how the layout changes.
- Change the order of children by adding number labels using the F2 key.