new LabelElement(options)
constructs a LabelElement instance
Parameters:
| Name | Type | Description |
|---|---|---|
options |
Object | the options to be merged with defaults settings |
Methods
-
alignText(mode)
-
aligns the text inside the LabelElement container
Parameters:
Name Type Description modeString can be a couple of word for horizontal or vertical align, in any order
accepts the following modes
- Horizontal Modes: left, center, right
- Vertical Modes: top, middle, bottom
Returns:
- Type
- LabelElement
-
centerText()
-
centers the text inside LabelElement container
-
computeBounds()
-
compute bounds before drawing all graphic elements of LabelElement instance
-
initDefaults(defaults)
-
Initialize default settings for Label Element
Parameters:
Name Type Description defaultsObject the defaults settings