Skip to main content

Home > @jsplumbtoolkit/core > Graph > setSource

Graph.setSource() method

Sets the source Group/Node/Port for some Edge.

Signature:

setSource(edge: Edge, o: string | Vertex): {
old?: Vertex;
new?: Vertex;
success: boolean;
edge?: Edge;
};

Parameters

ParameterTypeDescription
edgeEdgeThe Edge to change the source for
ostring | VertexGroup/Node/Port or id for new Edge source

Returns:

{ old?: Vertex; new?: Vertex; success: boolean; edge?: Edge; }