This class is a wrapper ILayerer implementation that delegates the actual layering to a delegate ILayerer object.
Remarks
If the graph consists of multiple components, they will be identified and each of the components will be layered separately using the delegate ILayerer instance. After that they will all be merged such that the desired aspect ratio is fulfilled best.
Default Values of Properties
considerNodeSize | true | |
desiredAspectRatio | 1 |
Type Details
- yfiles module
- layout-hierarchic
- yfiles-umd modules
- layout-familytree, layout-hierarchic, layout-radial, layout
- Legacy UMD name
- yfiles.hierarchic.AspectRatioComponentLayerer
See Also
Constructors
Creates a new instance of AspectRatioComponentLayerer using the given delegate ILayerer instance.
Parameters
A map of options to pass to the method.
- singleComponentLayerer - ILayerer
- considerNodeSize - boolean
Whether or not the size of the nodes should be considered. This option sets the considerNodeSize property on the created object.
- desiredAspectRatio - number
The desired aspect ratio. This option sets the desiredAspectRatio property on the created object.
Throws
Properties
Gets or sets whether or not the size of the nodes should be considered.
Remarks
Default Value
true
.Sample Graphs
Gets or sets the desired aspect ratio.
Remarks
If the graph consists of multiple components, they will be identified and each of the components will be layered separately using the delegate ILayerer instance. After that, they will all be merged such that the desired aspect ratio is best fulfilled.
The given aspect ratio should be greater or equal to 0
.
Default Value
1
.Throws
- Exception({ name: 'ArgumentError' })
- if the aspect ratio is negative
Sample Graphs
Methods
Assigns all nodes of the graph to layers and registers them to the ILayers instance based on the given aspect ratio.
Remarks
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 query information about the nodes and edges