react-native-rectangle-doc-scanner 7.21.0 → 7.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.
@@ -563,7 +563,11 @@ class CameraController(
563
563
 
564
564
  val matrix = Matrix()
565
565
  val viewRect = RectF(0f, 0f, viewWidth, viewHeight)
566
- val bufferRect = RectF(0f, 0f, preview.width.toFloat(), preview.height.toFloat())
566
+ val bufferRect = if (rotation == Surface.ROTATION_90 || rotation == Surface.ROTATION_270) {
567
+ RectF(0f, 0f, preview.height.toFloat(), preview.width.toFloat())
568
+ } else {
569
+ RectF(0f, 0f, preview.width.toFloat(), preview.height.toFloat())
570
+ }
567
571
  val centerX = viewRect.centerX()
568
572
  val centerY = viewRect.centerY()
569
573
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-rectangle-doc-scanner",
3
- "version": "7.21.0",
3
+ "version": "7.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",