mirror of
https://github.com/apache/cordova-plugin-screen-orientation.git
synced 2026-05-12 00:01:32 +08:00
add screen.orentation vairable update on lockOrientation()
This commit is contained in:
@@ -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');
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user