Skip to main content

Home > @jsplumb/core > Endpoint > detachFromConnection

Endpoint.detachFromConnection() method#

Detaches this Endpoint from the given Connection. If deleteOnEmpty is set to true and there are no Connections after this one is detached, the Endpoint is deleted.

Signature:

detachFromConnection(connection: Connection, idx?: number, transientDetach?: boolean): void;

Parameters#

ParameterTypeDescription
connectionConnectionConnection from which to detach.
idxnumberOptional, used internally to identify if this is the source (0) or target endpoint (1). Sometimes we already know this when we call this method.
transientDetachbooleanFor internal use only.

Returns:

void