Module: detect-device-orientation

Detection of device orientation (not orientation of viewport aka width/height ration)

Source:

CSS classes


device-orientation-portrait
device-orientation-landscape
device-orientation-0
most common state (default for device)
device-orientation-90
device is left side down
device-orientation-180
upside down
device-orientation-270
device is right side down

Methods


JS.Responsive.getDeviceOrientation()

Returns device orientation "portrait" or "landscape".

Since:
  • 3.0.0

Source:
Returns:

"portrait" or "landscape"

Type:
String

JS.Responsive.getDeviceOrientationAngle()

Returns angle of device orientation 0, 90, 180, 270 in degrees cross clock wise.

Since:
  • 3.0.0

Source:
Returns:

0, 90, 180, 270

Type:
Number

Events


changedDeviceOrientationAngle
changedDeviceOrientation