This class is a ILayerer implementation that observes relative and absolute layering constraints defined by the layer constraint factory.
Remarks
Furthermore, it can handle the edge directedness as specified by IDataProvider key EDGE_DIRECTEDNESS_DP_KEY.
For a given graph instance, the layer constraint factory can be created using method createLayerConstraintFactory. The ILayerer can be used for both common layering and layering of incremental nodes.
Default Values of Properties
allowSameLayerEdges | false | Same-layer edges cannot be created by this |
maximumDuration | <code>0x7FFFFFFF</code> | The layout algorithm runs unrestricted. |
Type Details
- yfiles module
- layout-hierarchic
- yfiles-umd modules
- layout-familytree, layout-hierarchic, layout-radial, layout
- Legacy UMD name
- yfiles.hierarchic.ConstraintIncrementalLayerer
See Also
Constructors
Creates a new ConstraintIncrementalLayerer with the given ILayerer instance as its core layerer.
Parameters
A map of options to pass to the method.
- coreLayerer - ILayerer
- the given ILayerer instance
- allowSameLayerEdges - boolean
Whether or not same-layer edges can be created by this ILayerer instance. This option sets the allowSameLayerEdges property on the created object.
- maximumDuration - number
The time limit in milliseconds set for the algorithm. This option sets the maximumDuration property on the created object.
Throws
- Exception({ name: 'ArgumentError' })
- if the given core layerer is
null
Properties
Gets or sets whether or not same-layer edges can be created by this ILayerer instance.
Remarks
Default Value
false
.Same-layer edges cannot be created by this
Gets or sets the time limit in milliseconds set for the algorithm.
Remarks
0
.Default Value
<code>0x7FFFFFFF</code>
.The layout algorithm runs unrestricted.
Throws
- Exception({ name: 'ArgumentError' })
- if the maximum duration is negative
Methods
Assigns all nodes of the graph to layers and adds them to the ILayers instance based on relative and absolute layering constraints defined by the given layering constraints.
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
See Also
Implements
Checks if the current setting of constraints is consistent, that is, the induced constraint graph has no cycles.
Throws
- Exception({ name: 'ArgumentError' })
- if the constraint graph is inconsistent