exists

checks whether the specified shape exists in the diagram

boolean exists(string|number id);

Parameters

idstring|numberthe id of the shape in question

Returns

booleantrue if the shape exists, otherwise false

Example

var shape = diagram.data.exists("1");

See also
Back to top