Skip to main content

Home > @jsplumbtoolkit/browser-ui > Surface > getObjectInfo

Surface.getObjectInfo() method#

Decodes the given input into a data structure containing a model object, its type, its ID, and the DOM element used to represent it. Always returns a value even if no model object could be resolved for the given input, but the fields of the return value may be null.

Signature:

getObjectInfo<T extends Base | Vertex | Group | Node | Port | Edge>(obj: Element | Connection | string | Node | Group | Edge | ObjectData): SurfaceObjectInfo<T>;

Parameters#

ParameterTypeDescription
objElement | Connection | string | Node | Group | Edge | ObjectDataObject to decode. Can be in many different forms - an existing model object, a vertex id, a DOM element, a Connection, some backing data.

Returns:

SurfaceObjectInfo<T>