A default implementation of a ILayeredComponentsMerger that provides simple default behaviors.
Remarks
Instances of this class are used internally by HierarchicLayoutCore and MultiComponentLayerer when e.g. the graph is grouped or it consists of more than one connected component.
Default Values of Properties
policy | ADD_RIGHT_TOP_ALIGNED
| Nodes of the source |
Type Details
- yfiles module
- layout-hierarchic
- yfiles-umd modules
- layout-familytree, layout-hierarchic, layout-radial, layout
- Legacy UMD name
- yfiles.hierarchic.DefaultLayeredComponentsMerger
Constructors
Creates a new instance of DefaultLayeredComponentsMerger with default settings.
Creates a new instance of DefaultLayeredComponentsMerger using the given merging policy.
Parameters
options - Object
A map of options to pass to the method.
A map of options to pass to the method.
- policy - MergingPolicy
- one of the predefined merging constants
Throws
- Exception({ name: 'ArgumentError' })
- if an unknown policy is given
Properties
Gets or sets the merging policy constant as defined in DefaultLayeredComponentsMerger.
Default Value
The default value is
ADD_RIGHT_TOP_ALIGNED.Nodes of the source
Throws
- Exception({ name: 'ArgumentError' })
- if an unknown policy is given
Methods
Merges two ILayers instances.
Remarks
All nodes that belong to the source and target ILayers are part of the graph at the moment of invocation.
The state of the source ILayers instance is discarded after this call and does not need to be updated to reflect the changes. The target ILayers instance must be updated accordingly.
Parameters
options - Object
A map of options to pass to the method.
A map of options to pass to the method.
- graph - LayoutGraph
- the graph containing the nodes of source and target ILayers instances
- ldp - ILayoutDataProvider
- the ILayoutDataProvider used for querying the layer indices
- srcLayers - ILayers
- targetLayers - ILayers
- the ILayers instance that will be modified to contain the resulting layering