getItem

returns the object of an item by its id

object getItem(string|number id);

Parameters

idstring|numberthe id of a selected item

Returns

objectthe object of an item

Example

var shape = diagram.data.getItem(123);

Details

You can access the original properties of an item like this:

// accessing the properties of the shape
var shape = diagram.data.getItem(123);
var text = shape.text;
See also
Back to top