react-native-rectangle-doc-scanner 3.35.0 → 3.36.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.
- package/dist/FullDocScanner.js +11 -22
- package/package.json +1 -1
- package/src/FullDocScanner.tsx +11 -25
package/dist/FullDocScanner.js
CHANGED
|
@@ -205,27 +205,16 @@ const FullDocScanner = ({ onResult, onClose, detectionConfig, overlayColor = '#3
|
|
|
205
205
|
return;
|
|
206
206
|
}
|
|
207
207
|
const normalizedDoc = normalizeCapturedDocument(document);
|
|
208
|
-
|
|
209
|
-
console.log('[FullDocScanner]
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
cropInitializedRef.current = false;
|
|
219
|
-
setCapturedDoc(normalizedDoc);
|
|
220
|
-
setImageSize(null);
|
|
221
|
-
setCropRectangle(null);
|
|
222
|
-
setScreen('crop');
|
|
223
|
-
return;
|
|
224
|
-
}
|
|
225
|
-
console.log('[FullDocScanner] Starting auto flow - processing capture');
|
|
226
|
-
processingCaptureRef.current = true;
|
|
227
|
-
processAutoCapture(document);
|
|
228
|
-
}, [manualCapture, processAutoCapture]);
|
|
208
|
+
// 자동 촬영이든 수동 촬영이든 모두 crop 화면으로 이동
|
|
209
|
+
console.log('[FullDocScanner] Moving to crop/preview screen');
|
|
210
|
+
manualCapturePending.current = false;
|
|
211
|
+
processingCaptureRef.current = false;
|
|
212
|
+
cropInitializedRef.current = false;
|
|
213
|
+
setCapturedDoc(normalizedDoc);
|
|
214
|
+
setImageSize(null);
|
|
215
|
+
setCropRectangle(null);
|
|
216
|
+
setScreen('crop');
|
|
217
|
+
}, []);
|
|
229
218
|
const handleCropChange = (0, react_1.useCallback)((rectangle) => {
|
|
230
219
|
setCropRectangle(rectangle);
|
|
231
220
|
}, []);
|
|
@@ -325,7 +314,7 @@ const FullDocScanner = ({ onResult, onClose, detectionConfig, overlayColor = '#3
|
|
|
325
314
|
}, [onClose, resetState]);
|
|
326
315
|
return (react_1.default.createElement(react_native_1.View, { style: styles.container },
|
|
327
316
|
screen === 'scanner' && (react_1.default.createElement(react_native_1.View, { style: styles.flex },
|
|
328
|
-
react_1.default.createElement(DocScanner_1.DocScanner, { ref: docScannerRef, autoCapture: !manualCapture, overlayColor: overlayColor, showGrid: showGrid, gridColor: resolvedGridColor, gridLineWidth: gridLineWidth, minStableFrames: minStableFrames ?? 6, detectionConfig: detectionConfig, onCapture: handleCapture, showManualCaptureButton:
|
|
317
|
+
react_1.default.createElement(DocScanner_1.DocScanner, { ref: docScannerRef, autoCapture: !manualCapture, overlayColor: overlayColor, showGrid: showGrid, gridColor: resolvedGridColor, gridLineWidth: gridLineWidth, minStableFrames: minStableFrames ?? 6, detectionConfig: detectionConfig, onCapture: handleCapture, showManualCaptureButton: false },
|
|
329
318
|
react_1.default.createElement(react_native_1.View, { style: styles.overlay, pointerEvents: "box-none" },
|
|
330
319
|
react_1.default.createElement(react_native_1.TouchableOpacity, { style: styles.closeButton, onPress: handleClose, accessibilityLabel: mergedStrings.cancel, accessibilityRole: "button" },
|
|
331
320
|
react_1.default.createElement(react_native_1.Text, { style: styles.closeButtonLabel }, "\u00D7")),
|
package/package.json
CHANGED
package/src/FullDocScanner.tsx
CHANGED
|
@@ -323,32 +323,18 @@ export const FullDocScanner: React.FC<FullDocScannerProps> = ({
|
|
|
323
323
|
}
|
|
324
324
|
|
|
325
325
|
const normalizedDoc = normalizeCapturedDocument(document);
|
|
326
|
-
const wantsManualFlow =
|
|
327
|
-
manualCapture || manualCapturePending.current || document.origin === 'manual';
|
|
328
326
|
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
processingCaptureRef.current = false;
|
|
339
|
-
cropInitializedRef.current = false;
|
|
340
|
-
setCapturedDoc(normalizedDoc);
|
|
341
|
-
setImageSize(null);
|
|
342
|
-
setCropRectangle(null);
|
|
343
|
-
setScreen('crop');
|
|
344
|
-
return;
|
|
345
|
-
}
|
|
346
|
-
|
|
347
|
-
console.log('[FullDocScanner] Starting auto flow - processing capture');
|
|
348
|
-
processingCaptureRef.current = true;
|
|
349
|
-
processAutoCapture(document);
|
|
327
|
+
// 자동 촬영이든 수동 촬영이든 모두 crop 화면으로 이동
|
|
328
|
+
console.log('[FullDocScanner] Moving to crop/preview screen');
|
|
329
|
+
manualCapturePending.current = false;
|
|
330
|
+
processingCaptureRef.current = false;
|
|
331
|
+
cropInitializedRef.current = false;
|
|
332
|
+
setCapturedDoc(normalizedDoc);
|
|
333
|
+
setImageSize(null);
|
|
334
|
+
setCropRectangle(null);
|
|
335
|
+
setScreen('crop');
|
|
350
336
|
},
|
|
351
|
-
[
|
|
337
|
+
[],
|
|
352
338
|
);
|
|
353
339
|
|
|
354
340
|
const handleCropChange = useCallback((rectangle: Rectangle) => {
|
|
@@ -491,7 +477,7 @@ export const FullDocScanner: React.FC<FullDocScannerProps> = ({
|
|
|
491
477
|
minStableFrames={minStableFrames ?? 6}
|
|
492
478
|
detectionConfig={detectionConfig}
|
|
493
479
|
onCapture={handleCapture}
|
|
494
|
-
showManualCaptureButton
|
|
480
|
+
showManualCaptureButton={false}
|
|
495
481
|
>
|
|
496
482
|
<View style={styles.overlay} pointerEvents="box-none">
|
|
497
483
|
<TouchableOpacity
|