Skip to content

LinkingConfig

Configuration for linking (edge creation) behavior.

edgePanningEnabled: boolean

Enable edge panning when the routed edge is near the edge of the viewport.

true

edgePanningForce: number

Multiplier for edge panning speed while routing edge is near the edge of the viewport.

10

edgePanningThreshold: number

The threshold in pixels for edge panning to start. If the mouse pointer is within this distance from the edge of the viewport, panning will be triggered.

30

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.

Edge

The default finalized edge data (may be incomplete).

Edge

The Edge object to use for the finalized edge.

(edge) => Edge

portSnapDistance: number

The maximum distance (in pixels) at temporary edge will snap to target port.

10

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.

Edge

The default temporary edge data (may be incomplete).

Edge

The Edge object to use for the temporary edge.

(edge) => Edge

validateConnection: (source, sourcePort, target, targetPort) => boolean

Validates whether a connection between two nodes and ports is allowed.

The source node.

null | Node

The source port.

null | Port

The target node.

null | Node

The target port.

null | Port

boolean

True if the connection is valid, false otherwise.

() => true