Interface for a class ShapeAnnotation
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');
string
Defines the type of annotation template String - Defines annotation template to be in string Template - Defines annotation template to be in html content
Enables or disables the default behaviors of the label.
string
Sets the textual description of the node/connector
Sets the space to be left between an annotation and its parent node/connector
number
Sets the height of the text
string
Sets the horizontal alignment of the text with respect to the parent node/connector
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');
string
Defines the unique id of the annotation
Sets the space to be left between an annotation and its parent node/connector
Sets the position of the annotation with respect to its parent bounds
number
Sets the rotate angle of the text
Defines the appearance of the text
string
| HTMLElement
Sets the textual description of the node/connector
string
Sets the type of the annotation
string
Sets the vertical alignment of the text with respect to the parent node/connector
boolean
Defines the visibility of the label
number
Sets the width of the text