react-native-expo-cropper 1.0.0 → 1.0.2
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/package.json +1 -1
- package/src/CustomCamera.js +1 -0
- package/src/ImageCropper.js +4 -4
- package/src/ImageCropperStyles.js +9 -10
package/package.json
CHANGED
package/src/CustomCamera.js
CHANGED
package/src/ImageCropper.js
CHANGED
|
@@ -58,7 +58,7 @@ const ImageCropper = ({ onConfirm, openCameraFirst, initialImage ,addheight}) =>
|
|
|
58
58
|
|
|
59
59
|
const initializeCropBox = () => {
|
|
60
60
|
const { width, height } = imageMeasure.current;
|
|
61
|
-
if (width === 0 || height === 0 || points.length > 0) return;
|
|
61
|
+
// if (width === 0 || height === 0 || points.length > 0) return;
|
|
62
62
|
const boxWidth = width * 0.6;
|
|
63
63
|
const boxHeight = height * 0.6;
|
|
64
64
|
const centerX = width / 2;
|
|
@@ -120,7 +120,7 @@ const ImageCropper = ({ onConfirm, openCameraFirst, initialImage ,addheight}) =>
|
|
|
120
120
|
};
|
|
121
121
|
|
|
122
122
|
const handleReset = () => {
|
|
123
|
-
setPoints([]);
|
|
123
|
+
// setPoints([]);
|
|
124
124
|
initializeCropBox();
|
|
125
125
|
};
|
|
126
126
|
|
|
@@ -147,9 +147,9 @@ const ImageCropper = ({ onConfirm, openCameraFirst, initialImage ,addheight}) =>
|
|
|
147
147
|
<TouchableOpacity
|
|
148
148
|
style={styles.button}
|
|
149
149
|
onPress={async () => {
|
|
150
|
-
setShowFullScreenCapture(true);
|
|
150
|
+
// setShowFullScreenCapture(true);
|
|
151
151
|
setIsLoading(true);
|
|
152
|
-
setShowResult(true);
|
|
152
|
+
// setShowResult(true);
|
|
153
153
|
try {
|
|
154
154
|
await new Promise((resolve) => requestAnimationFrame(resolve));
|
|
155
155
|
const capturedUri = await captureRef(viewRef, {
|
|
@@ -27,16 +27,15 @@ const styles = StyleSheet.create({
|
|
|
27
27
|
zIndex: 10,
|
|
28
28
|
},
|
|
29
29
|
button: {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
height: 60,
|
|
30
|
+
flex: 1,
|
|
31
|
+
width: "100%",
|
|
32
|
+
padding: 10,
|
|
33
|
+
alignItems: "center",
|
|
34
|
+
justifyContent: "center",
|
|
35
|
+
backgroundColor: "#549433",
|
|
36
|
+
borderRadius: 5,
|
|
37
|
+
marginBottom: 20,
|
|
38
|
+
marginRight:5,
|
|
40
39
|
},
|
|
41
40
|
buttonText: {
|
|
42
41
|
color: 'white',
|