This class is a wrapper ILayerer implementation that delegates the actual layering to a delegate ILayerer.
Remarks
Type Details
- yfiles module
- layout-hierarchic
- yfiles-umd modules
- layout-familytree, layout-hierarchic, layout-radial, layout
- Legacy UMD name
- yfiles.hierarchic.MultiComponentLayerer
Constructors
MultiComponentLayerer
(singleComponentLayerer: ILayerer, merger?: ILayeredComponentsMerger, componentComparer?: IComparer<Object>)Creates a new instance of MultiComponentLayerer using the given ILayeredComponentsMerger and IComparer<T> instances.
Remarks
null
, the DefaultLayeredComponentsMerger will be used instead.Throws
- Exception({ name: 'ArgumentError' })
- if the given layerer is
null
Methods
Assigns all nodes of the graph to layers and adds them to the ILayers instance.
Remarks
In order to create new layers, factory method insert has to be used.
Information about the nodes is provided by a ILayoutDataProvider. However, positional information (see position and layer) is not available during this phase.
Parameters
A map of options to pass to the method.
- graph - LayoutGraph
- the input graph
- layers - ILayers
- the ILayers instance that will be filled with the results of the calculation
- ldp - ILayoutDataProvider
- the ILayoutDataProvider used for querying information about the nodes and edges
See Also
Implements
Sorts an array which consists of YNodeLists each of which contains nodes that belong to the same component.
Remarks
It is called during assignLayers.
By default this method uses the ComponentComparator to sort the list and has no effect if the instance is null
.
Parameters
A map of options to pass to the method.
- nodeLists - YNodeList[]
- the array of YNodeLists each of which containing nodes that belong to the same component
- componentIndexProvider - IDataProvider
- the IDataProvider that returns an object (the component index) for each node (this value can be either integer or object)
Domain YNode Values Object an object representing the index of each node (either integer or object)