Interface: LabelOptions
Extends
Properties
alpha?
optionalalpha:number
Opacity of the node. 0 is fully transparent, 1 is fully opaque. Default is 1.0. Alpha has multiplicative inheritance. For example, if the node's parent is alpha .5 and this node's is alpha .4, then the node will appear with alpha .2.
Inherited from
Defined in
m2c2kit/packages/core/src/M2NodeOptions.ts:12
anchorPoint?
optionalanchorPoint:Point
Point within the node that determines its position. Default is { x: 0.5, y: 0.5 }, which centers the node on its position
Inherited from
Defined in
m2c2kit/packages/core/src/DrawableOptions.ts:5
backgroundColor?
optionalbackgroundColor:RgbaColor
Background color of label text. Default is no background color
Defined in
m2c2kit/packages/core/src/LabelOptions.ts:18
draggable?
optionaldraggable:boolean
Can the node be dragged?
Inherited from
Defined in
m2c2kit/packages/core/src/M2NodeOptions.ts:18
fontColor?
optionalfontColor:RgbaColor
Color of text. Default is Constants.DEFAULT_FONT_COLOR (WebColors.Black)
Inherited from
Defined in
m2c2kit/packages/core/src/TextOptions.ts:10
fontName?
optionalfontName:string
Name of font to use for text. Must have been previously loaded
Inherited from
Defined in
m2c2kit/packages/core/src/TextOptions.ts:8
fontNames?
optionalfontNames:string[]
Names of multiple fonts to use for text. For example, if a text font and an emoji font are to be used together. Must have been previously loaded
Defined in
m2c2kit/packages/core/src/LabelOptions.ts:20
fontSize?
optionalfontSize:number
Size of text. Default is Constants.DEFAULT_FONT_SIZE (16)
Inherited from
Defined in
m2c2kit/packages/core/src/TextOptions.ts:12
hidden?
optionalhidden:boolean
Is the node, and its children, hidden? (not displayed). Default is false
Inherited from
Defined in
m2c2kit/packages/core/src/M2NodeOptions.ts:20
horizontalAlignmentMode?
optionalhorizontalAlignmentMode:LabelHorizontalAlignmentMode
Horizontal alignment of label text. see LabelHorizontalAlignmentMode. Default is LabelHorizontalAlignmentMode.center
Defined in
m2c2kit/packages/core/src/LabelOptions.ts:14
interpolation?
optionalinterpolation:StringInterpolationMap
Map of placeholders to values for use in string interpolation during localization.
Inherited from
Defined in
m2c2kit/packages/core/src/TextOptions.ts:14
isUserInteractionEnabled?
optionalisUserInteractionEnabled:boolean
Does the node respond to user events, such as taps? Default is false
Inherited from
M2NodeOptions.isUserInteractionEnabled
Defined in
m2c2kit/packages/core/src/M2NodeOptions.ts:16
layout?
optionallayout:Layout
FOR INTERNAL USE ONLY
Inherited from
Defined in
m2c2kit/packages/core/src/M2NodeOptions.ts:22
localize?
optionallocalize:boolean
If true, try to use a localized version of the text. Default is true.
Inherited from
Defined in
m2c2kit/packages/core/src/TextOptions.ts:16
name?
optionalname:string
Name of the node. Only needed if the node will be referred to by name in a later function
Inherited from
Defined in
m2c2kit/packages/core/src/M2NodeOptions.ts:6
position?
optionalposition:Point
Position of the node within its parent coordinate system. Default is (0, 0)
Inherited from
Defined in
m2c2kit/packages/core/src/M2NodeOptions.ts:8
preferredMaxLayoutWidth?
optionalpreferredMaxLayoutWidth:number
Maximum width of label text before wrapping occurs. Default is the canvas width
Defined in
m2c2kit/packages/core/src/LabelOptions.ts:16
scale?
optionalscale:number
Scale of the node. Default is 1.0
Inherited from
Defined in
m2c2kit/packages/core/src/M2NodeOptions.ts:10
suppressEvents?
optionalsuppressEvents:boolean
Should the node not emit events to the EventStore? Default is false.
Remarks
This property is for use by authors of Composite nodes. It is not intended for general use.
Inherited from
Defined in
m2c2kit/packages/core/src/M2NodeOptions.ts:27
text?
optionaltext:string
Text to be displayed. When operating with localization, text within double square brackets will be replaced with the value of the key in the translation. For example, if the text is The translated word is [[RED]], [[RED]] will be replaced with the translation. If no localization is used, or a translation for the key is missing, then the text will be rendered as is. Tags for bold (b), italic (i), underline (u), overline(o), and strikethrough (s) are supported, e.g., <b><u>Bold and underline</u></b>. Note that while bold and italic and be combined, only one of underline, overline, and strikethrough can be used on a text segment.
Overrides
Defined in
m2c2kit/packages/core/src/LabelOptions.ts:12
uuid?
optionaluuid:string
Internal
Unique identifier (UUID). Will be generated automatically. For m2c2kit library use only
Inherited from
Defined in
m2c2kit/packages/core/src/M2NodeOptions.ts:24
zPosition?
optionalzPosition:number
Value along the z-axis to determine drawing and tap order. Larger values are on top.
Inherited from
Defined in
m2c2kit/packages/core/src/DrawableOptions.ts:7
zRotation?
optionalzRotation:number
Rotation of the node around the Z axis. Unit is radians. Default is 0 (no rotation). zRotation has inheritance. In addition to this node's zRotation, all ancestors' zRotations will be applied.
Inherited from
Defined in
m2c2kit/packages/core/src/M2NodeOptions.ts:14