@capacitor/screen-orientation 5.0.7 → 5.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -5,7 +5,7 @@ The Screen Orientation API provides information and functionality related to the
5
5
  ## Install
6
6
 
7
7
  ```bash
8
- npm install @capacitor/screen-orientation
8
+ npm install @capacitor/screen-orientation@latest-5
9
9
  npx cap sync
10
10
  ```
11
11
 
@@ -85,9 +85,11 @@ public class ScreenOrientation: NSObject {
85
85
  case "any":
86
86
  return UIInterfaceOrientationMask.all
87
87
  case "landscape", "landscape-primary":
88
- return UIInterfaceOrientationMask.landscapeLeft
89
- case "landscape-secondary":
88
+ // UIInterfaceOrientationMask.landscapeRight is the same as UIDeviceOrientation.landscapeLeft
90
89
  return UIInterfaceOrientationMask.landscapeRight
90
+ case "landscape-secondary":
91
+ // UIInterfaceOrientationMask.landscapeLeft is the same as UIDeviceOrientation.landscapeRight
92
+ return UIInterfaceOrientationMask.landscapeLeft
91
93
  case "portrait-secondary":
92
94
  return UIInterfaceOrientationMask.portraitUpsideDown
93
95
  default:
@@ -101,9 +103,15 @@ public class ScreenOrientation: NSObject {
101
103
  case "any":
102
104
  return UIInterfaceOrientation.unknown.rawValue
103
105
  case "landscape", "landscape-primary":
104
- return UIInterfaceOrientation.landscapeLeft.rawValue
105
- case "landscape-secondary":
106
+ // UIInterfaceOrientation.landscapeRight is the same as UIDeviceOrientation.landscapeLeft
107
+ // @see https://developer.apple.com/documentation/uikit/uiinterfaceorientation/landscaperight
108
+ // @see https://developer.apple.com/documentation/uikit/uideviceorientation/landscapeleft
106
109
  return UIInterfaceOrientation.landscapeRight.rawValue
110
+ case "landscape-secondary":
111
+ // UIInterfaceOrientation.landscapeLeft is the same as UIDeviceOrientation.landscapeRight
112
+ // @see https://developer.apple.com/documentation/uikit/uiinterfaceorientation/landscapeleft
113
+ // @see https://developer.apple.com/documentation/uikit/uideviceorientation/landscaperight
114
+ return UIInterfaceOrientation.landscapeLeft.rawValue
107
115
  case "portrait-secondary":
108
116
  return UIInterfaceOrientation.portraitUpsideDown.rawValue
109
117
  default:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capacitor/screen-orientation",
3
- "version": "5.0.7",
3
+ "version": "5.0.8",
4
4
  "description": "The Screen Orientation API provides methods to lock and unlock the screen orientation.",
5
5
  "main": "dist/plugin.cjs.js",
6
6
  "module": "dist/esm/index.js",
@@ -79,5 +79,5 @@
79
79
  "publishConfig": {
80
80
  "access": "public"
81
81
  },
82
- "gitHead": "d5483ce9f666f1a38c25a11e63899fd35701ca45"
82
+ "gitHead": "f6242b39fa8ba423d1912da5398fb11c2aadfa09"
83
83
  }