From 1f43b5ac9c1f5035557e4f0efefacac41b92fa45 Mon Sep 17 00:00:00 2001 From: Johan Eliasson Date: Mon, 20 Jul 2015 15:04:18 +0200 Subject: [PATCH] add screen.orentation vairable update on lockOrientation() --- www/screenorientation.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/www/screenorientation.js b/www/screenorientation.js index 7c74439..64c682b 100644 --- a/www/screenorientation.js +++ b/www/screenorientation.js @@ -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'); }; }