Index

HomeGesture

new HomeGesture()

HomeGesture is used as an alternative to the software home button for
devices without physical home buttons.
HomeGesture will trigger a 'home' event for a single swipe from the bottom
and a 'holdhome' event with a two-finger swipe from the bottom.

Members

_moving :Boolean

True when the user starts the home gesture.

_multiTouch :Boolean

True when the user is swiping with two or more fingers.

_startY1 :Integer

The position of the touchstart event.

enabled :Boolean

Whether or not the HomeGesture is enabled.

MINUMUM_DISTANCE :Integer

Minimum moving distance to home in pixel of screen height

Methods

handleEvent(evt)

General event handler interface.

Parameters:
Name Type Description
evt DOMEvent

The event.

publish(type)

Shortcut to publish a custom event.

Parameters:
Name Type Description
type String

The event type.

start(enable)

Starts the HomeGesture instance.

Parameters:
Name Type Description
enable Boolean

Whether or not the HomeGesture is enabled.

toggle(enable)

Toggles the state of the HomeGesture.

Parameters:
Name Type Description
enable Boolean

Whether or not the HomeGesture is enabled.