returns a collection of shapes
// get an array of all the shapes
$$("diagram").getShapes().serialize();
/*
[
{
backgroundColor: "#fff",
group: "Extra",
id: "laptop",
name: "Laptop",
template: /* svg code*/
},
// other shapes
]
*/
The method returns a collection of shapes (incl. custom and predefined shapes). You can serialize the collection to get an array of the shape objects as in the examble above.
If you need to retrieve a single shape, use the getShape
method.