This class is an ILayerAssigner implementation that observes relative and absolute layering constraints defined by layerConstraints or LayoutGraphLayerConstraints
Remarks
Furthermore, it can handle the edge directedness as specified with edgeDirectedness.
The ILayerAssigner 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 |
stopDuration | MAX_VALUE
| The layout algorithm runs unrestricted. |
Type Details
- yFiles module
- algorithms
See Also
Constructors
Creates a new ConstraintIncrementalLayerAssigner with the given ILayerAssigner instance as its core layerer.
Parameters
A map of options to pass to the method.
- coreLayerAssigner - ILayerAssigner
- The core ILayerAssigner instance.
- allowSameLayerEdges - boolean
- Whether or not same-layer edges can be created by this ILayerAssigner instance. This option sets the allowSameLayerEdges property on the created object.
- stopDuration - TimeSpan
- The time limit set for the algorithm. This option sets the stopDuration 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 ILayerAssigner instance.
Remarks
Default Value
false
.Same-layer edges cannot be created by this
Property Value
true
if same-layer edges can be created, false
otherwiseGets or sets the time limit set for the algorithm.
Remarks
Default Value
Property Value
Throws
- Exception({ name: 'ArgumentError' })
- if the stop duration is negative
Methods
Assigns all nodes of the graph to layers and adds them to the layers 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
- layoutContext - HierarchicalLayoutContext
- the HierarchicalLayoutContext used for querying information about the nodes and edges
See Also
layoutContext
will be filled by this ILayerAssigner. If the ILayerAssigner instance is used for layering incremental nodes, the layers structure already has to contain all non-incremental nodes.Implements
Constants
A data key for assigning additional edge weights.
Remarks
The ILayerAssigner tries to maintain edges with higher weights short.
Assign a value corresponding to an additional weight to each edge. Internally the value gets cast to an integer.