diff options
Diffstat (limited to 'plugins/com.phonegap.plugins.OrientationLock/www/orientationLock.js')
| -rw-r--r-- | plugins/com.phonegap.plugins.OrientationLock/www/orientationLock.js | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/plugins/com.phonegap.plugins.OrientationLock/www/orientationLock.js b/plugins/com.phonegap.plugins.OrientationLock/www/orientationLock.js new file mode 100644 index 00000000..099a5359 --- /dev/null +++ b/plugins/com.phonegap.plugins.OrientationLock/www/orientationLock.js @@ -0,0 +1,18 @@ +var OrientationLock = function() {} + +OrientationLock.prototype.lock = function(orientation, success, fail) { + return cordova.exec(success, fail, "OrientationLock", "lock", [orientation]) +} + +OrientationLock.prototype.unlock = function(success, fail) { + return cordova.exec(success, fail, "OrientationLock", "unlock", []) +} + +if ( ! window.plugins ) { + window.plugins = {} +} +if ( ! window.plugins.orientationLock ) { + window.plugins.orientationLock = new OrientationLock() +} + +module.exports = OrientationLock |
