Skip to main content

Home > @jsplumb/core > Connection > replaceEndpoint

Connection.replaceEndpoint() method#

Replace the Endpoint at the given index with a new Endpoint. This is used by the Toolkit edition, if changes to an edge type cause a change in Endpoint.

Signature:

replaceEndpoint(idx: number, endpointDef: EndpointSpec): void;

Parameters#

ParameterTypeDescription
idxnumber0 for source, 1 for target
endpointDefEndpointSpecSpec for the new Endpoint.

Returns:

void