This interface provides methods for creating layering constraints.
Type Details
- yfiles module
- layout-core
- yfiles-umd modules
- All layout modules, view-layout-bridge
- Legacy UMD name
- yfiles.hierarchic.ILayerConstraintFactory
See Also
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 with ID aboveId
to lie above the YNode with ID referenceId
.
Parameters
A map of options to pass to the method.
- referenceId - Object
- the ID of the reference node
- aboveId - Object
- the ID of the node that should lie above
Returns
- ↪ILayerConstraint
- a ILayerConstraint object that represents the constraint
See Also
Sample Graphs
addPlaceNodeAboveConstraint
(referenceId: Object, aboveId: Object, minDistance: number, weight?: number) : ILayerConstraintAdds a constraint that forces the YNode with ID aboveId
to lie at least minDistance
layers above the YNode with ID referenceId
with a given weight penalty for larger layer differences.
Remarks
Parameters
A map of options to pass to the method.
- referenceId - Object
- the ID of the reference node
- aboveId - Object
- the ID of the node that should lie above
- minDistance - number
- the minimum layer distance between the node and its reference node
- weight - number
- the weight penalty for larger layer differences
Returns
- ↪ILayerConstraint
- a ILayerConstraint object that represents the constraint
See Also
Sample Graphs
Adds a constraint that places a YNode on the bottom layer.
Parameters
A map of options to pass to the method.
- nodeId - Object
- the ID of the node that should lie on the bottom layer
Returns
- ↪ILayerConstraint
- a ILayerConstraint object that represents the constraint
See Also
Sample Graphs
Adds a constraint that places a YNode on the topmost layer.
Parameters
A map of options to pass to the method.
- nodeId - Object
- the ID of the node that should lie on the top layer
Returns
- ↪ILayerConstraint
- a ILayerConstraint object that represents the constraint
See Also
Sample Graphs
Adds a constraint that forces a YNode with ID belowId
to lie below the YNode with ID referenceId
.
Parameters
A map of options to pass to the method.
- referenceId - Object
- the ID of the reference node
- belowId - Object
- the ID of the node that should lie below
Returns
- ↪ILayerConstraint
- a ILayerConstraint object that represents the constraint
See Also
Sample Graphs
addPlaceNodeBelowConstraint
(referenceId: Object, belowId: Object, minDistance: number, weight?: number) : ILayerConstraintAdds a constraint that forces the YNode with ID belowId
to lie at least minDistance
layers below the YNode with ID referenceId
with a given weight penalty for larger layer differences.
Remarks
Parameters
A map of options to pass to the method.
- referenceId - Object
- the ID of the reference node
- belowId - Object
- the ID of the node that should lie below
- minDistance - number
- the minimum layer distance between the node and its reference node
- weight - number
- the weight penalty for larger layer differences
Returns
- ↪ILayerConstraint
- a ILayerConstraint object that represents the constraint
See Also
Sample Graphs
Adds a constraint that forces the YNode with ID sameLayerId
to lie in the same layer as the YNode with ID referenceId
.
Parameters
A map of options to pass to the method.
- referenceId - Object
- the ID of the reference node
- sameLayerId - Object
- the ID of the node that should lie in the same layer
Returns
- ↪ILayerConstraint
- a ILayerConstraint object that represents the constraint
See Also
Sample Graphs
Disposes this factory.