Skip to main content

Home > @jsplumbtoolkit/core > JsPlumbToolkit > connect

JsPlumbToolkit.connect() method

Connects two nodes/ports (or a combination of the two), by ID. This function does not know about the DOM: you cannot pass it DOM elements or selectors. By default, this method will create nodes that are missing. Port ids are specified with a dotted syntax, eg foo.bar refers to the port "bar" on the node "foo".

Signature:

connect(params: ConnectOptions): Edge;

Parameters

ParameterTypeDescription
paramsConnectOptionsConnect parameters.

Returns:

Edge

The new Edge.