ShapeDefaults
configurationDefines the default options that will be applied to all shapes in the Diagram.
shapeDefaults
ObjectDefines accessibility options for shapes.
shapeDefaults.center
ObjectDefines the center position of the shape. Applicable for the circle shape.
Defines the default options for the shape connectors.
Defines the connectors the shape owns. A connector is the point in the shape where a connection between this shape and another one can originate from or end.
- "top" - top connector.
- "right" - right connector.
- "bottom" - bottom connector.
- "bottomRight" - bottom right connector.
- "left" - left connector.
- "auto" - auto connector.
You can define your own custom connectors or use the predefined types.
shapeDefaults.content
ObjectDefines the default shapes content settings.
Defines the corner radius of the shape.
Default: 0
shapeDefaults.editable
Boolean|ObjectDefines the shape editable options.
Default: true
shapeDefaults.fill
String|ObjectDefines the fill options of the shape. Use these settings to apply a single-color or a gradient background to all shapes in the Diagram.
shapeDefaults.height
NumberDefines the default height of shapes in the Diagram.
Default: 100
shapeDefaults.hover
ObjectDefines the hover configuration.
shapeDefaults.minHeight
NumberDefines the minimum height the shape can have. Use this setting to apply a lower limit to the height of shapes when users resize them.
Default: 20
shapeDefaults.minWidth
NumberDefines the minimum width the shape can have. Use this setting to apply a lower limit to the width of shapes when users resize them.
Default: 20
shapeDefaults.path
StringThe path option of a Shape is a description of a custom geometry. The format follows the standard SVG format (https://www.w3.org/TR/SVG/paths.html#PathData "SVG Path data.").
shapeDefaults.radius
NumberDefines the radius of the shape. Applicable for the circle shape.
shapeDefaults.rotation
ObjectDefines the rotation of the shape.
Default: null
shapeDefaults.selectable
BooleanSpecifies if Diagram shapes can be selected.
Default: true
shapeDefaults.source
StringThe path/URL to the shape image. Applicable when the type is set to "image".
shapeDefaults.stroke
ObjectDefines the configuration of the border around Diagram shapes.
shapeDefaults.type
StringSpecifies the type of the Shape using any of the built-in shape type.
rectangle: this is the default optioncircle: a circle/ellipseimage: an imagetext: some text
Or common workflow shapes as:
Terminator: Start and end points of the workflow.Process: Standard processing steps or actions.Decision: Decision points with Yes/No or True/False branches.Document: Document creation or data output.PredefinedProcess: Subroutines or predefined operations.Database:Database operations or data storage.Delay:Wait periods or time-based operations.ManualOperation:Manual tasks requiring human intervention.
Default: "rectangle"
shapeDefaults.visual
FunctionA function that returns a visual element to render for a given shape. The following primitives can be used to construct a composite visual:
The origin of the visual bounding box has to be
(0, 0). If you have a complex path which coordinates cannot be easily adjusted, then position the element as demonstrated in this example.
shapeDefaults.width
NumberDefines the default width of shapes in the Diagram.
Default: 100
shapeDefaults.x
NumberDefines the x-coordinate of shapes added to the Diagram.
Default: 0
shapeDefaults.y
NumberDefines the y-coordinate of shapes added to the Diagram.
Default: 0