Z.Accelerometer

Inherits from Z.Base

Description

The Z.Accelerometer object reports the device's current orientation. For more information see Device Orientation.

Provided by Z.Accelerometer

Constructor

Z.Accelerometer( ) Constructs a new Z.Accelerometer object.

Events

landscape Emitted when the device is in the default landscape orientation.
landscapeinverted Emitted when the device is in an inverted landscape orientation, 180 degrees from landscape.
portrait Emitted when the device is in portrait orientation, 90 degrees clockwise from landscape.
portraitinverted Emitted when the device is in an inverted portrait orientation, 180 degrees from portrait.

Functions

orientation( ) Returns the current device orientation as a Z.Orientation value.

Inherited from Z.Base

Functions

emit(...) Calls the handler functions attached to an event.
hasTag(...) Returns true if this object has the specified tag.
off(...) Removes a handler function from an event.
on(...) Attaches a handler function to an event.
one(...) Attaches a single-use handler function to an event.
pushTag(...) Adds a tag to this object.
removeTag(...) Removes a tag from this object.
tags( ) Gets an array of the tags that this object belongs to.
tags(...) Sets the array of the tags that this object belongs to.
zapcode branded_zapcode i