getItem

returns the object of a shape by its id

object getItem(string|number id);

Parameters

idstring|numberthe id of a selected shape

Returns

objectthe object of a shape

Example

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

Details

You can access the original properties of a shape like this:

var shape = diagram.data.getItem(123);
var text = shape.text;
See also
Back to top