A IProcessor provides the possibility for each ITreeLayoutNodePlacer to prepare (and clean up) the graph for the children of the local root.
Inheritance Hierarchy
IProcessor
Remarks
It is created by createProcessor and called by the TreeLayout before and after the actual arrangement of the nodes.
A IProcessor may change values within the IDataMaps for its children. It can also temporarily change the graph by hiding nodes or adding dummy nodes.
Type Details
- yfiles module
- layout-tree
- yfiles-umd modules
- layout-orthogonal-compact, layout-orthogonal, layout-tree, layout
- Legacy UMD name
- yfiles.tree.IProcessor
Methods
This method is called by the TreeLayout after the layout has finished.
Remarks
It can be used for cleanup tasks.
Changes on the graph structure that have been made in preProcess can be undone here.
preProcess
(nodePlacerDataProvider: IDataMap, portAssignmentDataProvider: IDataMap, childComparatorProvider: IDataMap)Performs preparations for the actual tree layout in a pre-processing step.
Remarks
This method is called by TreeLayout before the ITreeLayoutNodePlacers are called recursively. A IProcessor may change some settings within this method. This can be used for specifying values for the children of the local root, manipulate the graph structure or do anything else that needs to be done.
Parameters
options - Object
A map of options to pass to the method.
A map of options to pass to the method.
- nodePlacerDataProvider - IDataMap
- the map that stores a ITreeLayoutNodePlacer instance for each node
Domain YNode Values ITreeLayoutNodePlacer the node placer instance responsible for the arrangement of the node's descendants - portAssignmentDataProvider - IDataMap
- The map that stores a ITreeLayoutPortAssignment instance for each node
Domain YNode Values ITreeLayoutPortAssignment the port assignment used for assigning the edge ports of the node - childComparatorProvider - IDataMap
- the map that stores a IComparer<T> instance for each node
Domain YNode Values IComparer<T> the comparator which is used when sorting the outgoing edges of the node
Only changes regarding the descendants of the current root node are allowed.