AsIsLayerer assigns nodes to layers by analyzing already existing node coordinates.
Remarks
Nodes whose bounding boxes overlap in the main layout direction are assigned to the same layer. To influence to which amount the boxes need to overlap, the nodes can temporarily be scaled. Alternatively, a minimum and maximum size or a halo can be specified for the nodes.
Default Values of Properties
maximumNodeSize | Number.MAX_VALUE
| |
minimumNodeSize | 0.0 | |
nodeHalo | 0.0d | |
nodeScalingFactor | 1.0 |
Type Details
- yfiles module
- layout-hierarchic
- yfiles-umd modules
- layout-familytree, layout-hierarchic, layout-radial, layout
- Legacy UMD name
- yfiles.hierarchic.AsIsLayerer
See Also
Constructors
Creates an instance of AsIsLayerer with default settings.
Parameters
A map of options to pass to the method.
- nodeScalingFactor - number
The scaling factor used for scaling the size of the nodes. This option sets the nodeScalingFactor property on the created object.
- maximumNodeSize - number
The maximum size of a node used for calculating layer overlaps. This option sets the maximumNodeSize property on the created object.
- minimumNodeSize - number
The minimum size of a node used for calculating layer overlaps. This option sets the minimumNodeSize property on the created object.
- nodeHalo - number
The size of the halo around a node, that means the insets that are used for calculating layer overlaps. This option sets the nodeHalo property on the created object.
Properties
Gets or sets the maximum size of a node used for calculating layer overlaps.
Remarks
This can be used for more fuzzy layering.
The maximum size can take positive values.
Default Value
Number.MAX_VALUE.Throws
- Exception({ name: 'ArgumentError' })
- if the specified value is less than
0
See Also
Sample Graphs
Gets or sets the minimum size of a node used for calculating layer overlaps.
Remarks
This can be used for more fuzzy layering.
The minimum size can take positive values.
Default Value
0.0
.Throws
- Exception({ name: 'ArgumentError' })
- if the specified value is less than
0
See Also
Sample Graphs
Gets or sets the size of the halo around a node, that means the insets that are used for calculating layer overlaps.
Remarks
If the value of the halo is positive, it specifies a border around a node. In case it is negative, it is considered as an inset that defines a smaller area inside the node.
This can be used for more fuzzy layering.
Default Value
0.0d
.See Also
Sample Graphs
Gets or sets the scaling factor used for scaling the size of the nodes.
Remarks
Nodes are being scaled from their center. This can be used for more fuzzy layering.
The scaling factor can take positive values. Factors smaller than 1
only consider large overlaps of the nodes' bounding boxes in the main layout direction. Factors larger than 1
also combine nodes with some distance between them.
Default Value
1.0
.Throws
- Exception({ name: 'ArgumentError' })
- if the specified value is less than
0
See Also
Sample Graphs
Methods
Assigns all nodes of the graph to layers by analyzing already existing node coordinates and adds them to the ILayers instance.
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 querying information about the nodes and edges
See Also
Implements
Callback used for calculating the lower (max) value of a given node.
Parameters
A map of options to pass to the method.
- graph - LayoutGraph
- the graph
- node - YNode
- the node
Returns
- ↪number
- the lower (max) of a given node
Callback used for calculating the upper (min) value of a given node.
Parameters
A map of options to pass to the method.
- graph - LayoutGraph
- the graph
- node - YNode
- the node
Returns
- ↪number
- the upper (min) value of a given node