The PortConstraintConfigurator provides the possibility to create PortConstraints according to the initial connecting side of an edge.
Inheritance Hierarchy
PortConstraintConfigurator
Type Details
- yfiles module
- layout-core
- yfiles-umd modules
- All layout modules, view-layout-bridge
- Legacy UMD name
- yfiles.layout.PortConstraintConfigurator
Constructors
Creates a new PortConstraintConfigurator instance.
Methods
createPortConstraintFromSketch
(graph: LayoutGraph, edge: Edge, source: boolean, strong: boolean) : PortConstraintCreates a PortConstraint for the given edge.
Remarks
The side of the constraint is set up according to the current drawing of the edge within the given graph.
Parameters
options - Object
A map of options to pass to the method.
A map of options to pass to the method.
- graph - LayoutGraph
- the input graph
- edge - Edge
- the edge
- source - boolean
true
if a source PortConstraint for the given edge will be created,false
for a target PortConstraint- strong - boolean
Returns
- ↪PortConstraint
- the PortConstraint for the given edge whose side is retrieved from the initial drawing
Creates weak PortConstraints for all edges of the given graph.
Parameters
options - Object
A map of options to pass to the method.
A map of options to pass to the method.
- graph - LayoutGraph
- the input graph
- spcMap - IEdgeMap
- the IEdgeMap that will be used for storing the source PortConstraints of the edges
Domain Edge Values PortConstraint a weak source for the edge - tpcMap - IEdgeMap
- the IEdgeMap that will be used for storing the target PortConstraints of the edges
Domain Edge Values PortConstraint a weak target for the edge
createPortConstraintsFromSketch
(graph: LayoutGraph, ec: IEdgeCursor, spcMap: IEdgeMap, strongSP: boolean, tpcMap: IEdgeMap, strongTP: boolean)Creates PortConstraints for some edges of the given graph.
Parameters
options - Object
A map of options to pass to the method.
A map of options to pass to the method.
- graph - LayoutGraph
- the input graph
- ec - IEdgeCursor
- the IEdgeCursor that provides access to the edges for which to create PortConstraints
- spcMap - IEdgeMap
- the IEdgeMap that will be used for storing the source PortConstraints of the edges
Domain Edge the edges accessible through the given edge cursor Values PortConstraint a source for the edge - strongSP - boolean
- tpcMap - IEdgeMap
- the IEdgeMap that will be used for storing the target PortConstraints of the edges
Domain Edge the edges accessible through the given edge cursor Values PortConstraint a target for the edge - strongTP - boolean