Implements algorithms for arranging tree structures.
Namespace: MindFusion.Graphs
File: BorderedTreeLayout.js
JavaScript Copy Code |
---|
// class |
To apply this layout to a diagram, create a BorderedTreeLayout instance, set its members and invoke the arrange method of the Diagram class. The method lays out all subtrees in a diagram.
As long as the graph is a tree, the algorithm can find the root node automatically. The distance between the root and the second level and between all subsequent levels can be set through the levelDistance property. The distance between adjacent nodes in the same level is set through nodeDistance.
In addition to arranging the tree nodes, BorderedTreeLayout also sets the shape of links as set through its linkType property.
MindFusion.Graphs.Layout
MindFusion.Graphs.BorderedTreeLayout