react-native-rectangle-doc-scanner 10.20.0 → 10.22.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.
@@ -486,7 +486,10 @@ class CameraController(
486
486
  val centerY = viewHeight / 2f
487
487
 
488
488
  // Calculate rotation from buffer to display coordinates.
489
- val rotationDegrees = ((sensorOrientation + displayRotationDegrees) % 360).toFloat()
489
+ // CameraX accounts for sensor orientation via targetRotation. Some tablets with landscape
490
+ // sensors report Display 90 in portrait but render upside down; add a 180° fix for that case.
491
+ val tabletUpsideDownFix = if (sensorOrientation == 0 && displayRotationDegrees == 90) 180 else 0
492
+ val rotationDegrees = ((displayRotationDegrees + tabletUpsideDownFix) % 360).toFloat()
490
493
 
491
494
  Log.d(TAG, "[TRANSFORM] Applying rotation: ${rotationDegrees}°")
492
495
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-rectangle-doc-scanner",
3
- "version": "10.20.0",
3
+ "version": "10.22.0",
4
4
  "description": "Native-backed document scanner for React Native with customizable overlays.",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",