NodeAnnotationDirective

12 Sep 20252 minutes to read

Nodes Directive

<e-nodes>
<e-node>
<e-node-annotations>
<e-node-annotation>
</e-node-annotation>
</e-node-annotations>
</e-node>
</e-nodes>

Properties

addInfo any

Allows the user to save custom information/data about an annotation

Defaults to undefined

annotationType any

Defines the type of annotation template
String - Defines annotation template to be in string
Template - Defines annotation template to be in html content

Defaults to ‘String’

constraints any

Enables or disables the default behaviors of the label.

  • ReadOnly - Enables/Disables the ReadOnly Constraints
  • InheritReadOnly - Enables/Disables the InheritReadOnly Constraints

Defaults to ‘InheritReadOnly’

content any

Sets the textual description of the node/connector

Defaults to ’’

dragLimit any

Sets the space to be left between an annotation and its parent node/connector

Defaults to new Margin(20,20,20,20)

height any

Sets the height of the text

Defaults to undefined

horizontalAlignment any

Sets the horizontal alignment of the text with respect to the parent node/connector

  • Stretch - Stretches the diagram element throughout its immediate parent
  • Left - Aligns the diagram element at the left of its immediate parent
  • Right - Aligns the diagram element at the right of its immediate parent
  • Center - Aligns the diagram element at the center of its immediate parent
  • Auto - Aligns the diagram element based on the characteristics of its immediate parent

Defaults to ‘Center’

Sets the hyperlink of the label

Defaults to undefined

id any

Defines the unique id of the annotation

Defaults to ’’

margin any

Sets the space to be left between an annotation and its parent node/connector

Defaults to new Margin(0,0,0,0)

offset any

Sets the position of the annotation with respect to its parent bounds

Defaults to { x: 0.5, y: 0.5 }

rotateAngle any

Sets the rotate angle of the text

Defaults to 0

rotationReference any

Gets or sets the reference mode for annotation rotation.

Defaults to ‘Parent’

style any

Defines the appearance of the text

Defaults to new TextStyle()

template any

Sets the textual description of the node/connector

Defaults to ‘undefined’

tooltip any

This property is used to show tooltip for annotation on mouse over.

Defaults to new DiagramToolTip();

type any

Sets the type of the annotation

  • Shape - Sets the annotation type as Shape
  • Path - Sets the annotation type as Path

Defaults to ‘Shape’

verticalAlignment any

Sets the vertical alignment of the text with respect to the parent node/connector

  • Stretch - Stretches the diagram element throughout its immediate parent
  • Top - Aligns the diagram element at the top of its immediate parent
  • Bottom - Aligns the diagram element at the bottom of its immediate parent
  • Center - Aligns the diagram element at the center of its immediate parent
  • Auto - Aligns the diagram element based on the characteristics of its immediate parent

Defaults to ‘Center’

visibility any

Defines the visibility of the label

Defaults to true

width any

Sets the width of the text

Defaults to undefined