This interface specifies the general contract for factory classes that can be used to associate sequence constraints with a graph.
Remarks
Sequence constraints affect the sequence of nodes within a layer.
A ISequenceConstraintFactory has to be disposed of after use. Disposing of the factory will also remove all constraints previously specified for the factory's associated graph.
Type Details
- yfiles module
- layout-core
- yfiles-umd modules
- All layout modules, view-layout-bridge
- Legacy UMD name
- yfiles.hierarchic.ISequenceConstraintFactory
See Also
- Sequence constraints cannot be used together with swimlanes.
- If you manually register with the graph a IDataProvider with key NODE_ID_DP_KEY, you must use the corresponding node IDs stored in this IDataProvider as arguments for all methods that create a constraint. Otherwise, you can just use the node instances themselves.
Sample Graphs
Properties
Gets a token that allows to bind a constraint factory to a graph instance after creation.
Remarks
See Also
Methods
Adds a constraint that forces the YNode or Edge with id after
to lie after the YNode or Edge with id reference
.
Parameters
A map of options to pass to the method.
- referenceId - Object
- the ID of the reference node or edge
- afterId - Object
- the ID of the node or edge that should be placed after the reference element
Sample Graphs
after
edge should be placed after that of the reference
edge, if possible). Constraints of edges with recursive edge style are ignored.Adds a constraint that places a YNode or Edge at the start of the sequence.
Parameters
A map of options to pass to the method.
- id - Object
- the ID of the node or edge that should be placed at the start
Sample Graphs
Adds a constraint that places a YNode or Edge at the end of the sequence.
Parameters
A map of options to pass to the method.
- id - Object
- the ID of the node or edge that should be placed at the end
Sample Graphs
Adds a constraint that forces the YNode or Edge with id before
to lie before the YNode or Edge with id reference
.
Parameters
A map of options to pass to the method.
- referenceId - Object
- the ID of the reference node or edge
- beforeId - Object
- the ID of the node or edge that should be placed before the reference element
Sample Graphs
before
edge should be placed before that of the reference
edge, if possible). Constraints of edges with recursive edge style are ignored.Disposes of the ISequenceConstraintFactory.