Search
DiagramItem.addLabel Method
See Also
 






Adds a new label to this item.

Namespace: MindFusion.Diagramming
File: DiagramItem.js

 Syntax

JavaScript  Copy Code

function addLabel (text)

 Parameters

text

String. The label's text.

 Return Value

A LinkLabel or NodeLabel instance, depending on item's type.

 Remarks

An item's main text content is specified via its text property. Call addLabel if you need to display additional text labels, such as identifiers or hints to the user.

Position of labels can be specified by calling methods such as setCornerPosition for nodes, or setControlPointPosition for links. You can let users move labels interactively by setting the behavior property of DiagramView to MoveLabels.

 See Also