Interface for a class Decorator
number
Sets the height of the decorator
string
Defines the geometry of the decorator shape
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
number
Sets the width of the decorator