CellCollection
This is a collection of dia.Cell instances which implements creating model instances from JSON using cellNamespace option. It inherits from mvc.Collection. This collection is created by each dia.GraphLayer instance and can be accessed using cellCollection property.
This collection also implements sorting by z-index and provides methods to get the maximum and minimum z-index of the cells in the collection.
const layer = graph.getLayer('cells');
const collection = layer.cellCollection;
Methods
maxZIndex()
cellCollection.maxZIndex(): number;
Return the maximum z-index of the cells in the collection.
minZIndex()
cellCollection.minZIndex(): number;
Return the minimum z-index of the cells in the collection.
Properties
cellNamespace
cellNamespace: any;
A dictionary of dia.Cell classes available for creating model instances from JSON.
layer
layer: dia.GraphLayer;
A reference to the dia.GraphLayer instance this collection belongs to.