Contents
- Properties
Having trouble getting help?
Contact Support
Contact Support
BasicShapeModel
23 Sep 20251 minute to read
Interface for a class BasicShape
Properties
cornerRadius number
Sets the corner of the node
points PointModel[]
Defines the collection of points to draw a polygon
shape BasicShapes
Defines the type of the basic shape
- Rectangle - Sets the type of the basic shape as Rectangle
- Ellipse - Sets the type of the basic shape as Ellipse
- Hexagon - Sets the type of the basic shape as Hexagon
- Parallelogram - Sets the type of the basic shape as Parallelogram
- Triangle - Sets the type of the basic shape as Triangle
- Plus - Sets the type of the basic shape as Plus
- Star - Sets the type of the basic shape as Star
- Pentagon - Sets the type of the basic shape as Pentagon
- Heptagon - Sets the type of the basic shape as Heptagon
- Octagon - Sets the type of the basic shape as Octagon
- Trapezoid - Sets the type of the basic shape as Trapezoid
- Decagon - Sets the type of the basic shape as Decagon
- RightTriangle - Sets the type of the basic shape as RightTriangle
- Cylinder - Sets the type of the basic shape as Cylinder
- Diamond - Sets the type of the basic shape as Diamond
type Shapes
Defines the type of node shape
<div id='diagram'></div>let shape: BasicShapeModel = { type: 'Basic', shape: 'Rectangle' };
let nodes: NodeModel[] = [{
id: 'node', width: 100, height: 100, offsetX: 100, offsetY: 100, shape: shape
}];
let diagram: Diagram = new Diagram({
...
nodes : nodes,
...
});
diagram.appendTo('#diagram');