eachParent

iterates through all parents of the specified item

void eachParent(string|number id,function callback,boolean self);

Parameters

idstring|numberthe id of the item
callbackfunctionthe function that will be applied to each parent of the item
selfbooleanoptional, defines whether the callback function should iterate over the specified item itself; false by default

Example

diagram.data.eachParent("id_1.1.1", (item) => {
    console.log(item);
}, false);

See also
Change log

Added in v4.0

Back to top