Class: AnnotationElement
Defined in: editor/annotationCells.ts:14
Diagram-only annotation element, exported and imported with the diagram.
Extends
Constructors
Constructor
new AnnotationElement(
props):AnnotationElement
Defined in: diagram/elements.ts:118
Parameters
| Parameter | Type |
|---|---|
|
Returns
AnnotationElement
Inherited from
Properties
| Property | Modifier | Type | Default value | Description | Inherited from |
|---|---|---|---|---|---|
|
| Events for the graph element. | |||
|
|
| Unique and immutable element ID on the diagram. | ||
|
|
| ‐ | ‐ |
Accessors
elementState
Get Signature
get elementState():
TemplateState
Defined in: diagram/elements.ts:195
Gets a serializable template-specific state for the element.
Returns
Inherited from
isExpanded
Get Signature
get isExpanded():
boolean
Defined in: diagram/elements.ts:173
Whether the element should be displayed as expanded (as defined by the element template).
Expanded state is stored in the element state with TemplateProperties.Expanded property.
Returns
boolean
Inherited from
position
Get Signature
get position():
Vector
Defined in: diagram/elements.ts:143
Gets the element position on the canvas in paper coordinates.
Returns
Inherited from
Methods
focus()
focus():
void
Defined in: diagram/elements.ts:215
Focuses on the element template on a canvas (if possible).
Returns
void
Inherited from
redraw()
redraw(
level?):void
Defined in: diagram/elements.ts:224
Forces a re-render of the element displayed by a template on a canvas.
Parameters
| Parameter | Type | Description |
|---|---|---|
|
| specifies which cached state should be invalidated on re-render |
Returns
void
Inherited from
setElementState()
setElementState(
value):void
Defined in: diagram/elements.ts:205
Sets a new value for elementState property.
Triggers ElementEvents.changeElementState event if new value does not equal to the previous one.
Parameters
| Parameter | Type |
|---|---|
|
Returns
void
Inherited from
setExpanded()
setExpanded(
value):void
Defined in: diagram/elements.ts:186
Sets a new value for isExpanded property.
Expanded state is stored in the element state with TemplateProperties.Expanded property.
Triggers ElementEvents.changeElementState event if new value does not equal to the previous one.
Parameters
| Parameter | Type |
|---|---|
|
|
Returns
void
Inherited from
setPosition()
setPosition(
value):void
Defined in: diagram/elements.ts:155
Sets a new value for position property.
Triggers ElementEvents.changePosition event if new value does not equal to the previous one.
Parameters
| Parameter | Type |
|---|---|
|
Returns
void
See
Inherited from
toJSON()
toJSON():
SerializedAnnotationElement
Defined in: editor/annotationCells.ts:31
Returns
fromJSON()
staticfromJSON(state,options):undefined|AnnotationElement
Defined in: editor/annotationCells.ts:17
Parameters
| Parameter | Type |
|---|---|
| |
|
Returns
undefined | AnnotationElement
generateId()
staticgenerateId():string
Defined in: diagram/elements.ts:136
Generates a new unique ID for an element.
Returns
string