studio.common.Orientation
An object representing orientation and related properties.

Inheritance

Constructor

studio.common.Orientation(modeopt_degrees)

Parameters

mode : studio.common.Orientation.Mode
The orientation mode, portrait or landscape.
opt_degrees : ?number=
The degrees of orientation. This varies by device and OS version whether -90/90 is landscape or 0/180 is.

Instance Methods

getDegrees() number
Returns the degrees of orientation. This is not dependable to calculate whether the device is landscape or portrait as the base orientation varies per device, per OS. This should be used to distinguish rotation for games and such.
Returns: number  The degrees of orientation. Default is 0.
getMode() studio.common.Orientation.Mode
Returns the orientation mode of the device or browser.
Returns: studio.common.Orientation.Mode  The orientation mode, 'portrait' or 'landscape'.

Enumerations

studio.common.Orientation.Mode :
The orientation mode.
Constants:
LANDSCAPE
No description.
PORTRAIT
No description.

Package studio.common

Package Reference