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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-expo-cropper",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "Recadrage polygonal d'images.",
5
5
  "main": "index.js",
6
6
  "author": "PCS AGRI",
@@ -41,6 +41,7 @@ useEffect(() => {
41
41
 
42
42
  const photo = await cameraRef.current.takePictureAsync({
43
43
  quality: 1,
44
+ shutterSound: false,
44
45
  });
45
46
 
46
47
 
@@ -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
- backgroundColor: PRIMARY_GREEN,
31
- paddingVertical: 18,
32
- paddingHorizontal: 30,
33
- borderRadius: 12,
34
- margin: 6,
35
- alignItems: 'center',
36
- justifyContent: 'center',
37
- borderWidth: 0,
38
- width: SCREEN_WIDTH * 0.4,
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',