summaryrefslogtreecommitdiff
path: root/plugins/com.phonegap.plugins.OrientationLock/www/orientationLock.js
blob: 099a535965ee8ba791411b489589f4f79fda857d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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