getIndex

returns the index of the shape by its id

number getIndex(string id);

Parameters

idstringthe id of the shape

Returns

numberthe index of the shape

Example

var index = diagram.data.getIndex("1"); // -> returns 0

See also
Back to top