mirror of
https://github.com/apache/cordova-plugin-screen-orientation.git
synced 2025-02-24 00:52:50 +08:00
Update screenorientation.ios.js
Remove the space
This commit is contained in:
parent
5097065d6b
commit
fedbff1241
@ -12,21 +12,23 @@ window.shouldRotateToOrientation = function(orientation) {
|
|||||||
var currOrientation = cordova.plugins.screenorientation.currOrientation;
|
var currOrientation = cordova.plugins.screenorientation.currOrientation;
|
||||||
switch (currOrientation) {
|
switch (currOrientation) {
|
||||||
case 'portrait':
|
case 'portrait':
|
||||||
|
if (orientation === 0 || orientation === 180) return true;
|
||||||
|
break;
|
||||||
case 'portrait-primary':
|
case 'portrait-primary':
|
||||||
if (orientation === 0) return true;
|
if (orientation === 0) return true;
|
||||||
break;
|
break;
|
||||||
|
case 'portrait-secondary':
|
||||||
|
if (orientation === 180) return true;
|
||||||
|
break;
|
||||||
case 'landscape':
|
case 'landscape':
|
||||||
|
if (orientation === -90 || orientation === 90) return true;
|
||||||
|
break;
|
||||||
case 'landscape-primary':
|
case 'landscape-primary':
|
||||||
if (orientation === -90) return true;
|
if (orientation === -90) return true;
|
||||||
break;
|
break;
|
||||||
case 'landscape':
|
|
||||||
case 'landscape-secondary':
|
case 'landscape-secondary':
|
||||||
if (orientation === 90) return true;
|
if (orientation === 90) return true;
|
||||||
break;
|
break;
|
||||||
case 'portrait':
|
|
||||||
case 'portrait-secondary':
|
|
||||||
if (orientation === 180) return true;
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
if (orientation === -90 || orientation === 90 || orientation === 0) return true;
|
if (orientation === -90 || orientation === 90 || orientation === 0) return true;
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user