MAF.element.Core
This is the base class for all MAF components. This component does not act on events from its element. Extended classes should define if they want to act on them.
Configs
events : {Object}
A object containing one or more event handlers to be added to this object during initialization.
The possible events are defined on each component.
Example
MAF.element.Core({ events: { onAppend: function () { // do something } } }).appendTo(this);
id : {String}
The unique id of this class
styles : {Object}
CSS styles for the component:
Name Type Argument Default Description width Number The width of this component in pixels.
height Number The height of this component in pixels.
hAlign String optional left Horizontal alignment of this component. (left, center, right)
vAlign String optional top Vertical alignment of this component. (top, center, bottom)
hOffset Number optional Horizontal offset of this component in pixels.
vOffset Number optional Vertical offset of this component.
Methods
animate(config)
Parameters:
Name Type Description config Object A config object
Fires:
freeze() → {Class}
Freezes this component. Screen renders no longer trigger until thawed.
Returns:
This component.
getAbsolutePosition() → {Object}
Give back the position relative to its first positioned ancestor element
Returns:
{hOffset:Number, vOffset: Number}
getView() → {Class}
Returns:
Returns the view this class is appended on.
hide() → {Class}
Hides this component.
Returns:
This component.
initialize()
Initialize the class
show() → {Class}
Shows this component.
Returns:
This component.
thaw() → {Class}
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.