HelpBot Assistant

How can I help you?

VisioNodeAnnotation

16 Mar 20262 minutes to read

Represents a text annotation for Visio node shapes (not connectors).
Extends VisioAnnotation with node-specific text positioning based on shape type.

Properties

content string

Text content of the annotation

height number

Height of the annotation in diagram units

Hyperlink associated with the annotation

id string

Unique identifier for the annotation

margin VisioMarginModel

Margin properties around the text

offset Point

Normalized offset position (0-1 range) relative to shape bounds

rotateAngle number

Rotation angle in degrees

segmentAngle boolean

Flag indicating if text angle should follow connector segment angle

style VisioTextStyleModel

Text styling properties

txtHeight number

Text height in node units

txtLocPinX number

Text local pin X coordinate (center reference point)

txtLocPinY number

Text local pin Y coordinate (center reference point)

txtPinX number

Text pin X coordinate relative to node

txtPinY number

Text pin Y coordinate relative to node

txtWidth number

Text width in node units

visible boolean

Flag indicating if annotation is visible

width number

Width of the annotation in diagram units

Methods

applyMasterTextFallback

Applies a master-text fallback to a node annotation when page text is empty.
Keeps page text if present; otherwise fills from master and forces visibility true.

Parameter Type Description
annotation VisioNodeAnnotation The already-parsed page annotation object
pageShape VisioShapeNode The page-level shape XML (source for page text)
masterShape VisioShapeNode | null The master-level shape XML (source for placeholder text)

Returns void

fromJs

Creates a VisioNodeAnnotation instance from a Visio node shape object.
Extracts text properties and applies shape-specific text positioning.

Parameter Type Description
shape any The Visio node shape object
defaultData ParsedXmlObject Default data containing shape name, width, height, and positioning

Returns VisioNodeAnnotation