react-native-expo-cropper 1.2.37 → 1.2.38
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/dist/CustomCamera.js +6 -6
- package/dist/ImageCropper.js +884 -804
- package/package.json +1 -1
- package/src/CustomCamera.js +6 -7
- package/src/ImageCropper.js +856 -790
package/dist/CustomCamera.js
CHANGED
|
@@ -105,10 +105,9 @@ function CustomCamera(_ref) {
|
|
|
105
105
|
return null;
|
|
106
106
|
}
|
|
107
107
|
|
|
108
|
-
// ✅
|
|
109
|
-
|
|
110
|
-
var
|
|
111
|
-
var frameHeight = wrapperHeight * 0.80; // 80% height
|
|
108
|
+
// ✅ Calculate green frame as percentage of WRAPPER
|
|
109
|
+
var frameWidth = wrapperWidth * 0.85; // 85% of wrapper width
|
|
110
|
+
var frameHeight = wrapperHeight * 0.70; // 70% of wrapper height
|
|
112
111
|
var frameX = (wrapperWidth - frameWidth) / 2; // Centered horizontally
|
|
113
112
|
var frameY = (wrapperHeight - frameHeight) / 2; // Centered vertically
|
|
114
113
|
|
|
@@ -122,8 +121,9 @@ function CustomCamera(_ref) {
|
|
|
122
121
|
// ✅ Store percentages for easier mapping later
|
|
123
122
|
percentX: frameX / wrapperWidth * 100,
|
|
124
123
|
percentY: frameY / wrapperHeight * 100,
|
|
125
|
-
percentWidth:
|
|
126
|
-
|
|
124
|
+
percentWidth: 85,
|
|
125
|
+
// 85% of wrapper width
|
|
126
|
+
percentHeight: 70 // 70% of wrapper height
|
|
127
127
|
};
|
|
128
128
|
console.log("✅ Green frame coordinates calculated:", frameCoords);
|
|
129
129
|
return frameCoords;
|