@capgo/capacitor-screen-orientation 8.1.10 → 8.1.12
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/android/build.gradle
CHANGED
|
@@ -30,7 +30,7 @@ android {
|
|
|
30
30
|
buildTypes {
|
|
31
31
|
release {
|
|
32
32
|
minifyEnabled false
|
|
33
|
-
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
|
33
|
+
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
lintOptions {
|
|
@@ -17,7 +17,7 @@ import com.getcapacitor.annotation.CapacitorPlugin;
|
|
|
17
17
|
@CapacitorPlugin(name = "CapacitorScreenOrientation")
|
|
18
18
|
public class CapacitorScreenOrientationPlugin extends Plugin implements SensorEventListener {
|
|
19
19
|
|
|
20
|
-
private final String pluginVersion = "8.1.
|
|
20
|
+
private final String pluginVersion = "8.1.12";
|
|
21
21
|
private int currentOrientation;
|
|
22
22
|
private SensorManager sensorManager;
|
|
23
23
|
private Sensor accelerometer;
|
|
@@ -260,10 +260,10 @@ public class CapacitorScreenOrientationPlugin extends Plugin implements SensorEv
|
|
|
260
260
|
// Z axis: up/down (gravity when flat)
|
|
261
261
|
if (Math.abs(x) > threshold && Math.abs(x) > Math.abs(y)) {
|
|
262
262
|
// Landscape orientation
|
|
263
|
-
return x > 0 ? "landscape-
|
|
263
|
+
return x > 0 ? "landscape-primary" : "landscape-secondary";
|
|
264
264
|
} else if (Math.abs(y) > threshold) {
|
|
265
265
|
// Portrait orientation
|
|
266
|
-
return y > 0 ? "portrait-
|
|
266
|
+
return y > 0 ? "portrait-primary" : "portrait-secondary";
|
|
267
267
|
}
|
|
268
268
|
// Default to current if unclear
|
|
269
269
|
return currentPhysicalOrientation;
|
|
@@ -11,7 +11,7 @@ import UIKit
|
|
|
11
11
|
*/
|
|
12
12
|
@objc(CapacitorScreenOrientationPlugin)
|
|
13
13
|
public class CapacitorScreenOrientationPlugin: CAPPlugin, CAPBridgedPlugin {
|
|
14
|
-
private let pluginVersion: String = "8.1.
|
|
14
|
+
private let pluginVersion: String = "8.1.12"
|
|
15
15
|
public let identifier = "CapacitorScreenOrientationPlugin"
|
|
16
16
|
public let jsName = "CapacitorScreenOrientation"
|
|
17
17
|
public let pluginMethods: [CAPPluginMethod] = [
|
package/package.json
CHANGED