A ISubtreePlacerProcessor provides the possibility for each ISubtreePlacer to prepare (and clean up) the graph for the children of the local root.
Inheritance Hierarchy
ISubtreePlacerProcessor
Remarks
It is created by createProcessor and called by the TreeLayout before and after the actual arrangement of the nodes.
A ISubtreePlacerProcessor may change values within the IMapper<K,V>s for its children. It can also temporarily change the graph by hiding nodes or adding new helper nodes.
Type Details
- yFiles module
- algorithms
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
(subtreePlacers: IMapper<LayoutNode,ISubtreePlacer>, portAssigners: IMapper<LayoutNode,ITreeLayoutPortAssigner>, outEdgeComparisons: IMapper<LayoutNode,function(LayoutEdge,LayoutEdge):number>)Performs preparations for the actual tree layout in a pre-processing step.
Remarks
This method is called by TreeLayout before the ISubtreePlacers are called recursively. A ISubtreePlacerProcessor 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.
- subtreePlacers - IMapper<LayoutNode,ISubtreePlacer>
- the IMapper<K,V> that stores an ISubtreePlacer instance for the arrangement of the node's descendants for each node
- portAssigners - IMapper<LayoutNode,ITreeLayoutPortAssigner>
- The IMapper<K,V> that stores an ITreeLayoutPortAssigner instance used for assigning the edge ports for each node
- outEdgeComparisons - IMapper<LayoutNode,function(LayoutEdge,LayoutEdge):number>
- the IMapper<K,V> that stores a comparison function which is used when sorting the outgoing edges of each node
Only changes regarding the descendants of the current root node are allowed.