mirror of
https://github.com/apache/cordova-plugin-screen-orientation.git
synced 2025-02-23 16:42:50 +08:00
add screen.orentation vairable update on lockOrientation()
This commit is contained in:
parent
dda55807c7
commit
1f43b5ac9c
@ -56,11 +56,13 @@ function addScreenOrientationApi(obj) {
|
||||
return;
|
||||
}
|
||||
screenOrientation.currOrientation = orientation;
|
||||
screen.orientation = screenOrientation.currOrientation;
|
||||
screenOrientation.setOrientation(orientation);
|
||||
};
|
||||
|
||||
obj.unlockOrientation = function() {
|
||||
screenOrientation.currOrientation = 'unlocked';
|
||||
screen.orientation = screenOrientation.currOrientation;
|
||||
screenOrientation.setOrientation('unlocked');
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user