MAF.element.Text
new MAF.element.Text()
Configs
anchorStyle : {String}
Controls how the text is aligned in the component.
data : {String}
The text that the component will display.
firstLine : {Number}
First line of text.
styles : {Object}
CSS styles for the component:
Name Type Description truncation String Indicate if the should truncate when it does not fit the component. It will not truncate by default, use 'end' to turn it on. If truncation is allowed all HTML tags will be stripped from the text.
wrap Boolean Display text in a single line or wrap the text. When setting the wrap property the styles.width config is required. Default is false.
totalLines : {Number}
Total lines of text.
visibleLines : {Number}
Number of text lines visible.
Methods
freeze() → {Class} inherited
Freezes this component. Screen renders no longer trigger until thawed.
Returns:
This component.
getAbsolutePosition() → {Object} inherited
Give back the position relative to its first positioned ancestor element
Returns:
{hOffset:Number, vOffset: Number}
getText()
Get which text is displayed on this component.
getView() → {Class} inherited
Returns:
Returns the view this class is appended on.
hide() → {Class} inherited
Hides this component.
Returns:
This component.
initialize() inherited
Initialize the class
setText(text)
Set which text to display on this component.
Parameters:
Name Type Description text String The text
show() → {Class} inherited
Shows this component.
Returns:
This component.
thaw() → {Class} inherited
Thawes this component. Screen renders can trigger again.
Returns:
This component.
Events
onAnimationEnded
Fired when a animation on this component has ended.
onAppend
Fired when component has appended to a parent. Update visual appearances by applying a Theme style and rendering the skin.
onChange
Fired when a change happened.
onLayoutChange
Fired when a the layout of the component has changed.