react-native-rectangle-doc-scanner 10.13.0 → 10.15.0

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.
@@ -474,14 +474,15 @@ class CameraController(
474
474
  val centerX = viewWidth / 2f
475
475
  val centerY = viewHeight / 2f
476
476
 
477
- // Calculate rotation needed
478
- // Sensor orientation 90° = needs 270° rotation (or -90°)
479
- // Sensor orientation 270° = needs 90° rotation
477
+ // Calculate rotation needed for portrait display
478
+ // For back camera in portrait mode, we need to rotate counter-clockwise
479
+ // Sensor 0° = landscape sensor, need 270° (-90°) rotation
480
+ // Sensor 90° = portrait sensor, need 270° (-90°) rotation to correct
480
481
  val rotationDegrees = when (sensorOrientation) {
481
- 0 -> 0f
482
- 90 -> 270f // Most common for back camera
483
- 180 -> 180f
484
- 270 -> 90f // Some devices
482
+ 0 -> 270f // Tablet - landscape sensor
483
+ 90 -> 270f // Phone - portrait sensor but still needs 270° rotation
484
+ 180 -> 90f // Inverted
485
+ 270 -> 90f // Some rare devices
485
486
  else -> 270f
486
487
  }
487
488
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-rectangle-doc-scanner",
3
- "version": "10.13.0",
3
+ "version": "10.15.0",
4
4
  "description": "Native-backed document scanner for React Native with customizable overlays.",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",