react-native-rectangle-doc-scanner 0.70.0 → 0.71.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.
@@ -73,27 +73,8 @@ const Overlay = ({ quad, color = '#e7a649', frameSize, showGrid = true, gridColo
73
73
  sourceQuad = quad;
74
74
  }
75
75
  else {
76
- const marginRatio = 0.12;
77
- const marginX = screenWidth * marginRatio;
78
- const marginY = screenHeight * marginRatio;
79
- const maxWidth = screenWidth - marginX * 2;
80
- const maxHeight = screenHeight - marginY * 2;
81
- const a4Ratio = Math.SQRT2; // ~1.414 height / width
82
- let width = maxWidth;
83
- let height = width * a4Ratio;
84
- if (height > maxHeight) {
85
- height = maxHeight;
86
- width = height / a4Ratio;
87
- }
88
- const left = (screenWidth - width) / 2;
89
- const top = (screenHeight - height) / 2;
90
- transformedQuad = [
91
- { x: left, y: top },
92
- { x: left + width, y: top },
93
- { x: left + width, y: top + height },
94
- { x: left, y: top + height },
95
- ];
96
- sourceFrameSize = null;
76
+ // No detection yet – skip drawing
77
+ return { outlinePath: null, gridPaths: [] };
97
78
  }
98
79
  if (sourceQuad && sourceFrameSize) {
99
80
  if (__DEV__) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-rectangle-doc-scanner",
3
- "version": "0.70.0",
3
+ "version": "0.71.0",
4
4
  "description": "Native-backed document scanner for React Native with customizable overlays.",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",
@@ -66,27 +66,8 @@ export const Overlay: React.FC<OverlayProps> = ({
66
66
  if (quad && frameSize) {
67
67
  sourceQuad = quad;
68
68
  } else {
69
- const marginRatio = 0.12;
70
- const marginX = screenWidth * marginRatio;
71
- const marginY = screenHeight * marginRatio;
72
- const maxWidth = screenWidth - marginX * 2;
73
- const maxHeight = screenHeight - marginY * 2;
74
- const a4Ratio = Math.SQRT2; // ~1.414 height / width
75
- let width = maxWidth;
76
- let height = width * a4Ratio;
77
- if (height > maxHeight) {
78
- height = maxHeight;
79
- width = height / a4Ratio;
80
- }
81
- const left = (screenWidth - width) / 2;
82
- const top = (screenHeight - height) / 2;
83
- transformedQuad = [
84
- { x: left, y: top },
85
- { x: left + width, y: top },
86
- { x: left + width, y: top + height },
87
- { x: left, y: top + height },
88
- ];
89
- sourceFrameSize = null;
69
+ // No detection yet – skip drawing
70
+ return { outlinePath: null, gridPaths: [] };
90
71
  }
91
72
 
92
73
  if (sourceQuad && sourceFrameSize) {