API Docs for:
Show:

UIPanel

Extends UI
Defined in: js/uipanel.js:1
Module: UI

Summary

A Panel to show views

Item Index

Properties

Methods

_init

Defined in js/uipanel.js:107

Syntax

_init

() private

Summary

Initialize a panel

hide

Inherited from UI: js/ui.js:72

Syntax

hide

() UI private

Summary

Hides element from view

Returns:

UI:

Example:

m.app.ui.hide();

on

Defined in js/uipanel.js:256

Syntax

on

(
  • event
)
Function

Summary

Set callback function for an event

Parameters:

  • event String

    Event string name

Returns:

Function:

Callback function

Example:

m.app.view("index").panel.on("transitionEnd", function(self) {
    console.log("transition end!")
});

position

Defined in js/uipanel.js:217

Syntax

position

(
  • [coordinates]
)
Object private

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 optional

    Object with coordinates. Example: {x: 0, y: 0}

Returns:

Object:

Object with coordinates. Example: {x: 0, y: 0}

show

Inherited from UI: js/ui.js:59

Syntax

show

() UI private

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

Defined in js/uipanel.js:239

Syntax

transition

(
  • [transition]
)
String private

Summary

Set or get transition type

Parameters:

  • [transition] String optional

    Transition type. MUST be one of: slide-left, slide-right, none

Returns:

String:

Transition type

Properties

$el

Inherited from UI: js/ui.js:46

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

Inherited from UI: js/ui.js:33

Syntax

el

Unknown

Summary

DOM element

Example:

appDOMElement = m.app.ui.el;
appDOMElement.addEventListener("touchend", function() {
    console.log("Header was touched.");
});