DecoratorModel
23 Sep 20251 minute to read
Interface for a class Decorator
Properties
height number
Sets the height of the decorator
pathData string
Defines the geometry of the decorator shape
pivot PointModel
Defines the position of the decorator with respect to the source/target point of the connector
shape DecoratorShapes
<div id='diagram'></div>let connectors: ConnectorModel[] = [{
id: 'connector', type: 'Straight', sourcePoint: { x: 500, y: 100 }, targetPoint: { x: 600, y: 200 },
sourceDecorator: {
style: { fill: 'black' },
shape: 'Arrow',
pivot: { x: 0, y: 0.5 }},
targetDecorator: {
shape: 'Diamond',
style: { fill: 'blue' },
pivot: { x: 0, y: 0.5 }}
},];
let diagram: Diagram = new Diagram({
...
connectors: connectors
...
});
diagram.appendTo('#diagram');style ShapeStyleModel
Defines the appearance of the decorator
width number
Sets the width of the decorator