UIPanel
Summary
A Panel to show views
Methods
_init
Syntax
_init
()
private
Summary
Initialize a panel
on
Syntax
on
(
Function
-
event
Summary
Set callback function for an event
Parameters:
-
event
StringEvent string name
Returns:
Function:
Callback function
Example:
m.app.view("index").panel.on("transitionEnd", function(self) {
console.log("transition end!")
});
position
Syntax
position
(
Object
private
-
[coordinates]
Summary
Move the element to the specified position inside the UIApp / m-views-container. If coordinates are not specified, it returns coordinates object with the current position.
Parameters:
-
[coordinates]
Object optionalObject with coordinates. Example: {x: 0, y: 0}
Returns:
Object:
Object with coordinates. Example: {x: 0, y: 0}
show
Syntax
Summary
Shows element (not necesarily, since the element's parent might be hidden or out of view)
Returns:
UI:
Example:
m.app.ui.show();
transition
Syntax
transition
(
String
private
-
[transition]
Summary
Set or get transition type
Parameters:
-
[transition]
String optionalTransition type. MUST be one of: slide-left, slide-right, none
Returns:
String:
Transition type
Properties
$el
Syntax
$el
Unknown
Summary
Zepto/jQuery object for DOM element
Example:
$appDOMElement = m.app.ui.$el;
$appDOMElement.on("tap", function() {
console.log("Header was tapped.");
});
el
Syntax
el
Unknown
Summary
DOM element
Example:
appDOMElement = m.app.ui.el;
appDOMElement.addEventListener("touchend", function() {
console.log("Header was touched.");
});