react-native-orientation-bits
Version:
A react-native module that can listen on orientation changing of device, get current orientation, lock to preferred orientation.
63 lines (41 loc) • 1.19 kB
JavaScript
//
// react-native-orientation-locker
//
//
// Created by Wonday on 17/5/12.
// Copyright (c) wonday.org All rights reserved.
//
;
export default class Orientation {
static configure = options => {}
static getOrientation = cb => {
cb("UNKNOWN");
};
static getDeviceOrientation = cb => {
cb("UNKNOWN");
};
static isLocked = () => {
return false;
};
static lockToPortrait = () => {};
static lockToPortraitUpsideDown = () => {};
static lockToLandscape = () => {};
static lockToLandscapeRight = () => {};
static lockToLandscapeLeft = () => {};
// OrientationMaskAllButUpsideDown
static lockToAllOrientationsButUpsideDown = () => {};
static unlockAllOrientations = () => {};
static addOrientationListener = cb => {};
static removeOrientationListener = cb => {};
static addDeviceOrientationListener = cb => {};
static removeDeviceOrientationListener = cb => {};
static addLockListener = cb => {};
static removeLockListener = cb => {};
static removeAllListeners = () => {};
static getInitialOrientation = () => {
return "UNKNOWN";
};
static getAutoRotateState = cb => {
cb(true);
};
}