Skip to main content

Home > @jsplumbtoolkit/core > JsPlumbToolkit > addEdge

JsPlumbToolkit.addEdge() method#

Adds an Edge to the Graph.

Signature:

addEdge(params: AddEdgeOptions & {        addedByMouse?: boolean;    }, source?: ToolkitRenderer<any>, doNotFireEvent?: boolean): Edge;

Parameters#

ParameterTypeDescription
paramsAddEdgeOptions & { addedByMouse?: boolean; }Options for the new edge
sourceToolkitRenderer<any>The renderer that was the source of the action. Optional, used internally.
doNotFireEventbooleanOptional. Won't fire an event if this is true. For internal use only.

Returns:

Edge

The Edge that was added.