Decorators are used to decorate the end points of the connector with some predefined path geometry
number
Sets the height of the decorator
Defaults to 10
string
Defines the geometry of the decorator shape
Defaults to ”
Defines the position of the decorator with respect to the source/target point of the connector
<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');
Defines the appearance of the decorator
Defaults to new ShapeStyle()
number
Sets the width of the decorator
Defaults to 10