From 83400033a3b7a91ad072a5d306355c9cd5a80d82 Mon Sep 17 00:00:00 2001 From: PliablePixels Date: Fri, 24 Jul 2015 15:48:01 -0400 Subject: integrated event scrubbing with direct image access - need to clean up code --- .../www/orientationLock.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 plugins/com.phonegap.plugins.OrientationLock/www/orientationLock.js (limited to 'plugins/com.phonegap.plugins.OrientationLock/www') 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 -- cgit v1.2.3