map

iterates through all items of the diagram

void map(function handler);

Parameters

handlerfunctiona function that will be called for each shape of a diagram

Example

//getting ids of all elements of the diagram (shapes and links)
diagram.data.map(function(item){
    console.log(item.id);
});

Back to top