Search
Diagram.defaultShape Property
See Also
 






Gets or sets the default shape assigned to new ShapeNode objects.

Namespace: MindFusion.Diagramming
File: Diagram.js

 Syntax

JavaScript  Copy Code

get defaultShape() {}
set defaultShape(value) {}

 Property Value

Shape | String

A Shape object or identifier.

 Remarks

The shape property of newly created ShapeNode objects is initialized with the value of this property. It defines a series of lines, arcs and curves composed in a complex shape. There are predefined shapes exposed as static members of the Shapes class. You can also define your own shapes as shown below.

 Example

JavaScript  Copy Code

var shape = new MindFusion.Diagramming.Shape({
   id: "DoubleEllipse",
   outline: "M100,50 A50,50,0,1,1,0,50 A50,50,0,1,1,100,50",
   decoration: "M98,50 A48,48,0,1,1,2,50 A48,48,0,1,1,98,50",
   fillMode: "nonzero"});

diagram.defaultShape = shape;

 See Also