diff options
| author | PliablePixels <pliablepixels@gmail.com> | 2015-07-24 15:48:01 -0400 |
|---|---|---|
| committer | PliablePixels <pliablepixels@gmail.com> | 2015-07-24 15:48:01 -0400 |
| commit | 83400033a3b7a91ad072a5d306355c9cd5a80d82 (patch) | |
| tree | b84d23a607523249554dc97ed26f000ca03d0abd /plugins/com.phonegap.plugins.OrientationLock/www/orientationLock.js | |
| parent | 89640e9b0212a2525ea132b1d11bb8962f5444dd (diff) | |
integrated event scrubbing with direct image access - need to clean up code
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 |
