Skip to main content

Home > @jsplumbtoolkit/core > JsPlumbToolkit > findGraphObject

JsPlumbToolkit.findGraphObject() method#

Finds the object that matches the given spec.

Signature:

findGraphObject(spec: string | Vertex | Edge): Vertex | Edge | Graph;

Parameters#

ParameterTypeDescription
specstring | Vertex | EdgeIf a string, a Node/Port matching that id is retrieved. Otherwise if spec is already a Graph object (Node or Port), it is returned.

Returns:

Vertex | Edge | Graph