@capawesome/capacitor-screen-orientation 6.0.0 → 6.0.1
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.
|
@@ -57,7 +57,7 @@ import Capacitor
|
|
|
57
57
|
}
|
|
58
58
|
completion(cachedOrientationType)
|
|
59
59
|
}
|
|
60
|
-
|
|
60
|
+
|
|
61
61
|
@objc private func requestGeometryUpdate(orientationValue: Int, orientationMask: UIInterfaceOrientationMask) {
|
|
62
62
|
if #available(iOS 16, *) {
|
|
63
63
|
let windowScene = UIApplication.shared.connectedScenes.first as? UIWindowScene
|
|
@@ -100,7 +100,7 @@ import Capacitor
|
|
|
100
100
|
self.currentOrientationType = orientationType
|
|
101
101
|
self.plugin.notifyOrientationChangeListeners(orientationType)
|
|
102
102
|
}
|
|
103
|
-
|
|
103
|
+
|
|
104
104
|
@objc private func convertOrientationValueToMask(_ orientationValue: Int) -> UIInterfaceOrientationMask {
|
|
105
105
|
switch orientationValue {
|
|
106
106
|
case UIInterfaceOrientation.landscapeLeft.rawValue:
|
|
@@ -113,14 +113,14 @@ import Capacitor
|
|
|
113
113
|
return UIInterfaceOrientationMask.portraitUpsideDown
|
|
114
114
|
default:
|
|
115
115
|
let isPortrait = UIApplication.shared.windows.first?.windowScene?.interfaceOrientation.isPortrait ?? false
|
|
116
|
-
return isPortrait ? UIInterfaceOrientationMask.portrait : UIInterfaceOrientationMask.
|
|
116
|
+
return isPortrait ? UIInterfaceOrientationMask.portrait : UIInterfaceOrientationMask.landscape
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
119
|
|
|
120
120
|
@objc private func convertOrientationTypeToMask(_ orientationType: String) -> UIInterfaceOrientationMask {
|
|
121
121
|
switch orientationType {
|
|
122
122
|
case "landscape":
|
|
123
|
-
return UIInterfaceOrientationMask.
|
|
123
|
+
return UIInterfaceOrientationMask.landscape
|
|
124
124
|
case "landscape-primary":
|
|
125
125
|
return UIInterfaceOrientationMask.landscapeLeft
|
|
126
126
|
case "landscape-secondary":
|
package/package.json
CHANGED