Interface: LabelOptions
Extends
Properties
alpha?
optional
alpha: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
Source
anchorPoint?
optional
anchorPoint: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
Source
backgroundColor?
optional
backgroundColor:RgbaColor
Background color of label text. Default is no background color
Source
draggable?
optional
draggable:boolean
Can the node be dragged?
Inherited from
Source
fontColor?
optional
fontColor:RgbaColor
Color of text. Default is Constants.DEFAULT_FONT_COLOR (WebColors.Black)
Inherited from
Source
fontName?
optional
fontName:string
Name of font to use for text. Must have been previously loaded
Inherited from
Source
fontNames?
optional
fontNames: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
Source
fontSize?
optional
fontSize:number
Size of text. Default is Constants.DEFAULT_FONT_SIZE (16)
Inherited from
Source
hidden?
optional
hidden:boolean
Is the node, and its children, hidden? (not displayed). Default is false
Inherited from
Source
horizontalAlignmentMode?
optional
horizontalAlignmentMode:LabelHorizontalAlignmentMode
Horizontal alignment of label text. see LabelHorizontalAlignmentMode. Default is LabelHorizontalAlignmentMode.center
Source
interpolation?
optional
interpolation:StringInterpolationMap
Map of placeholders to values for use in string interpolation during localization.
Inherited from
Source
isUserInteractionEnabled?
optional
isUserInteractionEnabled:boolean
Does the node respond to user events, such as taps? Default is false
Inherited from
M2NodeOptions
.isUserInteractionEnabled
Source
layout?
optional
layout:Layout
FOR INTERNAL USE ONLY
Inherited from
Source
localize?
optional
localize:boolean
If true, try to use a localized version of the text. Default is true.
Inherited from
Source
name?
optional
name:string
Name of the node. Only needed if the node will be referred to by name in a later function
Inherited from
Source
position?
optional
position:Point
Position of the node within its parent coordinate system. Default is (0, 0)
Inherited from
Source
preferredMaxLayoutWidth?
optional
preferredMaxLayoutWidth:number
Maximum width of label text before wrapping occurs. Default is the canvas width
Source
scale?
optional
scale:number
Scale of the node. Default is 1.0
Inherited from
Source
suppressEvents?
optional
suppressEvents: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
Source
text?
optional
text:string
Text to be displayed
Inherited from
Source
uuid?
Internal
optional
uuid:string
Unique identifier (UUID). Will be generated automatically. For m2c2kit library use only
Inherited from
Source
zPosition?
optional
zPosition:number
Value along the z-axis to determine drawing and tap order. Larger values are on top.
Inherited from
Source
zRotation?
optional
zRotation: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.