Defines the textual description of nodes/connectors with respect to bounds
Object
Allows the user to save custom information/data about an annotation
<div id='diagram'></div>
let addInfo: {} = { content: 'label' };
let nodes: NodeModel[] = [{
id: 'node1', width: 100, height: 100, offsetX: 100, offsetY: 100,
annotations: [{ id: 'label1',
content: 'text', constraints: ~AnnotationConstraints.InheritReadOnly, addInfo: addInfo
}],
}];
let diagram: Diagram = new Diagram({
...
nodes : nodes,
...
});
diagram.appendTo('#diagram');
Defaults to undefined
Enables or disables the default behaviors of the label.
Defaults to ‘InheritReadOnly’
string
Sets the textual description of the node/connector
Defaults to ”
Sets the space to be left between an annotation and its parent node/connector
Defaults to new Margin(20,20,20,20)
number
Sets the height of the text
Defaults to undefined
string
Sets the horizontal alignment of the text with respect to the parent node/connector
Defaults to ‘Center’
Sets the hyperlink of the label
<div id='diagram'></div>
let nodes: NodeModel[] = [{
id: 'node1', width: 100, height: 100, offsetX: 100, offsetY: 100,
annotations: [{ id: 'label1',
content: 'Default Shape', style: { color: 'red' },
hyperlink: { link: 'https://www.google.com', color : 'blue', textDecoration : 'Overline', content : 'google' }
}, {content: 'text', constraints: ~AnnotationConstraints.InheritReadOnly
}],
}];
let diagram: Diagram = new Diagram({
...
nodes : nodes,
...
});
diagram.appendTo('#diagram');
Defaults to undefined
string
Defines the unique id of the annotation
Defaults to ”
Sets the space to be left between an annotation and its parent node/connector
Defaults to new Margin(0,0,0,0)
Sets the position of the annotation with respect to its parent bounds
Defaults to { x: 0.5, y: 0.5 }
number
Sets the rotate angle of the text
Defaults to 0
Defines the appearance of the text
Defaults to new TextStyle()
string
| HTMLElement
Sets the textual description of the node/connector
Defaults to ‘undefined’
string
Sets the type of the annotation
Defaults to ‘Shape’
string
Sets the vertical alignment of the text with respect to the parent node/connector
Defaults to ‘Center’
boolean
Defines the visibility of the label
Defaults to true
number
Sets the width of the text
Defaults to undefined