LinkingConfig
Configuration for linking (edge creation) behavior.
Properties
Section titled “Properties”finalEdgeDataBuilder()
Section titled “finalEdgeDataBuilder()”finalEdgeDataBuilder: (
defaultFinalEdgeData
) =>Edge
Allows customization of the final edge object when the user completes edge creation. Receives the default finalized edge (with source/target node/port IDs) and should return a fully-formed Edge object to be added to the flow.
Parameters
Section titled “Parameters”defaultFinalEdgeData
Section titled “defaultFinalEdgeData”The default finalized edge data (may be incomplete).
Returns
Section titled “Returns”The Edge object to use for the finalized edge.
portSnapDistance
Section titled “portSnapDistance”portSnapDistance:
number
The maximum distance (in pixels) at temporary edge will snap to target port.
temporaryEdgeDataBuilder()
Section titled “temporaryEdgeDataBuilder()”temporaryEdgeDataBuilder: (
defaultTemporaryEdgeData
) =>Edge
Allows customization of the temporary edge object shown while the user is dragging to create a new edge. Receives the default temporary edge (with source/target node/port IDs and positions) and should return a fully-formed Edge object for rendering the temporary edge.
Parameters
Section titled “Parameters”defaultTemporaryEdgeData
Section titled “defaultTemporaryEdgeData”The default temporary edge data (may be incomplete).
Returns
Section titled “Returns”The Edge object to use for the temporary edge.
validateConnection()
Section titled “validateConnection()”validateConnection: (
source
,sourcePort
,target
,targetPort
) =>boolean
Validates whether a connection between two nodes and ports is allowed.
Parameters
Section titled “Parameters”source
Section titled “source”The source node.
null
| Node
sourcePort
Section titled “sourcePort”The source port.
null
| Port
target
Section titled “target”The target node.
null
| Node
targetPort
Section titled “targetPort”The target port.
null
| Port
Returns
Section titled “Returns”boolean
True if the connection is valid, false otherwise.