returns the data object of a specified shape
id | string | shape ID |
// get config object of the "dot" type
const dotConfig = $$("diagram1").getShape("dot");
The method returns the configuration object of a type specified as a parameter.
webix.ui({
view: "diagram",
id: "diagram1",
shapes: [
{
id: "dot",
name: "Final node",
fontColor: "white",
lineColor: "#65C0B7",
backgroundColor: "#fff",
altBackgroundColor: "#65C0B7"
},
// other shapes
],
});
const dotConfig = $$("diagram1").getShape("dot");
/*
{
id: "dot",
name: "Final node",
fontColor: "white",
lineColor: "#65C0B7",
backgroundColor: "#fff",
altBackgroundColor: "#65C0B7"
}
*/
You can also get a collection of all the shapes (custom and built-in) via the getShapes
method.