Defines the behavior of default IconShapes
string
Sets the border color of an icon.
Defaults to ”
number
Defines the border width of the icon.
Defaults to 1
string
Defines the custom content of the icon
Defaults to ”
number
Defines the corner radius of the icon border
Defaults to 0
string
Sets the fill color of an icon.
<div id='diagram'></div>
let nodes: NodeModel[] = [{
id: 'node1', width: 100, height: 100, offsetX: 100, offsetY: 100,
annotations: [{ content: 'Default Shape' }],
expandIcon: { height: 20, width: 20, shape: "ArrowDown", fill: 'red' },
collapseIcon: { height: 20, width: 20, shape: "ArrowUp" },
}];
let diagram: Diagram = new Diagram({
...
nodes: nodes,
...
});
diagram.appendTo('#diagram');
Defaults to ‘white’
number
Defines the height of the icon.
Defaults to 10
string
Defines how the Icon has to be horizontally aligned.
Defaults to ‘Auto’
Defines the space that the icon has to be moved from its actual position
Defaults to new Margin(0,0,0,0)
Defines the offset of the icon.
Defaults to new Point(0.5,1)
Defines the space that the icon has to be moved from the icon border
Defaults to new Margin(2,2,2,2)
string
Defines the geometry of a path
Defaults to ”
string
Defines the shape of the icon. None Minus - sets the icon shape as minus Plus - sets the icon shape as Plus ArrowUp - sets the icon shape as ArrowUp ArrowDown - sets the icon shape as ArrowDown Template - sets the icon shape based on the given custom template Path - sets the icon shape based on the given custom Path
Defaults to ‘None’
string
Defines how the Icon has to be Vertically aligned.
Defaults to ‘Auto’
number
Defines the width of the icon.
Defaults to 10