Updated Readme with new methods for screen object

This commit is contained in:
maverickmishra 2017-02-07 15:37:47 -08:00
parent 4d6d8b45ee
commit 9fca54ea48

View File

@ -29,10 +29,10 @@ The plugin adds the following to the screen object (`window.screen`):
```js ```js
// lock the device orientation // lock the device orientation
.lockOrientation('portrait') .orientation.lock('portrait')
// unlock the orientation // unlock the orientation
.unlockOrientation() .orientation.unlock()
// current orientation // current orientation
.orientation .orientation
@ -72,10 +72,10 @@ cordova plugin add cordova-plugin-screen-orientation
```js ```js
// set to either landscape // set to either landscape
screen.lockOrientation('landscape'); screen.orientation.lock('landscape');
// allow user rotate // allow user rotate
screen.unlockOrientation(); screen.orientation.unlock();
// access current orientation // access current orientation
console.log('Orientation is ' + screen.orientation); console.log('Orientation is ' + screen.orientation);