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;
|
return;
|
||||||
}
|
}
|
||||||
screenOrientation.currOrientation = orientation;
|
screenOrientation.currOrientation = orientation;
|
||||||
|
screen.orientation = screenOrientation.currOrientation;
|
||||||
screenOrientation.setOrientation(orientation);
|
screenOrientation.setOrientation(orientation);
|
||||||
};
|
};
|
||||||
|
|
||||||
obj.unlockOrientation = function() {
|
obj.unlockOrientation = function() {
|
||||||
screenOrientation.currOrientation = 'unlocked';
|
screenOrientation.currOrientation = 'unlocked';
|
||||||
|
screen.orientation = screenOrientation.currOrientation;
|
||||||
screenOrientation.setOrientation('unlocked');
|
screenOrientation.setOrientation('unlocked');
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user