The TreeComponentLayout arranges tree-like subgraph structures in a mixed layout style.
Remarks
Default Values of Properties
considerUndirectedTrees | false | Only directed subtrees are handled |
optimizeOrientation | false | Components keep their orientation. |
Type Details
- yfiles module
- layout-tree
- yfiles-umd modules
- layout-orthogonal-compact, layout-orthogonal, layout-tree, layout
- Legacy UMD name
- yfiles.tree.TreeComponentLayout
Constructors
Creates a new TreeComponentLayout instance using the specified layouter for arranging the subtrees.
Parameters
A map of options to pass to the method.
- coreLayout - ILayoutAlgorithm
- the layout algorithm used for arranging the tree components
- treeComponentCoreLayout - ILayoutAlgorithm
The layout algorithm that is applied to tree components. This option sets the treeComponentCoreLayout property on the created object.
- optimizeOrientation - boolean
Whether or not tree component arrangement is improved by changing the orientation of components. This option sets the optimizeOrientation property on the created object.
- considerUndirectedTrees - boolean
Whether or not undirected tree sub-graphs should be detected and handled. This option sets the considerUndirectedTrees property on the created object.
Throws
- Exception({ name: 'ArgumentError' })
- if the specified layout algorithm is
null
Properties
Gets or sets whether or not undirected tree sub-graphs should be detected and handled.
Remarks
Default Value
false
.Only directed subtrees are handled
Gets or sets the core layout algorithm.
Remarks
See Also
Implements
Gets or sets the layout algorithm that is applied to tree components.
Throws
- Exception({ name: 'ArgumentError' })
- if the specified layout algorithm is
null
Methods
Finds the tree components inside the given graph and applies a tree layout to them.
Parameters
A map of options to pass to the method.
- graph - LayoutGraph
- the input graph
See Also
Implements
Delegates the layout calculation to the core layout algorithm and handles the dummy nodes.
Remarks
The dummy nodes are marked using the given IDataProvider.
This implementation just registers the dummy node IDataProvider with the graph with key DUMMY_NODE_DP_KEY, executes the core layout algorithm and finally removes the data provider again.
This method is called by applyLayout to invoke the core layout algorithm. It may be overridden to customize the handling of the dummy nodes.
Parameters
A map of options to pass to the method.
- graph - LayoutGraph
- the input graph
- dummyDp - IDataProvider
- the IDataProvider which marks the dummy nodes
null
.Constants
A data provider key for identifying dummy nodes during the layout calculation.
Remarks
Domain | YNode | |
Values | boolean | true if the node is a dummy node, false otherwise |