react-native-rectangle-doc-scanner 3.62.0 → 3.64.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/DocScanner.js
CHANGED
|
@@ -240,9 +240,9 @@ exports.DocScanner = (0, react_1.forwardRef)(({ onCapture, overlayColor = DEFAUL
|
|
|
240
240
|
}), [capture]);
|
|
241
241
|
const overlayPolygon = detectedRectangle?.rectangleOnScreen ?? detectedRectangle?.rectangleCoordinates ?? null;
|
|
242
242
|
const overlayIsActive = autoCapture ? isAutoCapturing : (detectedRectangle?.stableCounter ?? 0) > 0;
|
|
243
|
-
const detectionThreshold = autoCapture ? minStableFrames :
|
|
243
|
+
const detectionThreshold = autoCapture ? minStableFrames : 99999;
|
|
244
244
|
return (react_1.default.createElement(react_native_1.View, { style: styles.container },
|
|
245
|
-
react_1.default.createElement(react_native_document_scanner_1.default, { ref: scannerRef, style: styles.scanner, detectionCountBeforeCapture: detectionThreshold, overlayColor: overlayColor, enableTorch: enableTorch, quality: normalizedQuality, useBase64: useBase64, manualOnly:
|
|
245
|
+
react_1.default.createElement(react_native_document_scanner_1.default, { ref: scannerRef, style: styles.scanner, detectionCountBeforeCapture: detectionThreshold, overlayColor: overlayColor, enableTorch: enableTorch, quality: normalizedQuality, useBase64: useBase64, manualOnly: false, detectionConfig: detectionConfig, onPictureTaken: handlePictureTaken, onError: handleError, onRectangleDetect: handleRectangleDetect }),
|
|
246
246
|
showGrid && overlayPolygon && (react_1.default.createElement(overlay_1.ScannerOverlay, { active: overlayIsActive, color: gridColor ?? overlayColor, lineWidth: gridLineWidth, polygon: overlayPolygon })),
|
|
247
247
|
showManualCaptureButton && (react_1.default.createElement(react_native_1.TouchableOpacity, { style: styles.button, onPress: handleManualCapture })),
|
|
248
248
|
children));
|
package/package.json
CHANGED
package/src/DocScanner.tsx
CHANGED
|
@@ -332,7 +332,7 @@ export const DocScanner = forwardRef<DocScannerHandle, Props>(
|
|
|
332
332
|
const overlayPolygon = detectedRectangle?.rectangleOnScreen ?? detectedRectangle?.rectangleCoordinates ?? null;
|
|
333
333
|
const overlayIsActive = autoCapture ? isAutoCapturing : (detectedRectangle?.stableCounter ?? 0) > 0;
|
|
334
334
|
|
|
335
|
-
const detectionThreshold = autoCapture ? minStableFrames :
|
|
335
|
+
const detectionThreshold = autoCapture ? minStableFrames : 99999;
|
|
336
336
|
|
|
337
337
|
return (
|
|
338
338
|
<View style={styles.container}>
|
|
@@ -344,7 +344,7 @@ export const DocScanner = forwardRef<DocScannerHandle, Props>(
|
|
|
344
344
|
enableTorch={enableTorch}
|
|
345
345
|
quality={normalizedQuality}
|
|
346
346
|
useBase64={useBase64}
|
|
347
|
-
manualOnly={
|
|
347
|
+
manualOnly={false}
|
|
348
348
|
detectionConfig={detectionConfig}
|
|
349
349
|
onPictureTaken={handlePictureTaken}
|
|
350
350
|
onError={handleError}
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
[self setEnableBorderDetection:YES];
|
|
13
13
|
[self setDelegate: self];
|
|
14
14
|
_hasSetupCamera = NO;
|
|
15
|
-
self.manualOnly = YES
|
|
16
|
-
self.detectionCountBeforeCapture =
|
|
15
|
+
self.manualOnly = NO; // Changed from YES to NO - allow manual capture to work
|
|
16
|
+
self.detectionCountBeforeCapture = 99999; // High threshold to prevent auto-capture
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
return self;
|
|
@@ -413,7 +413,12 @@
|
|
|
413
413
|
|
|
414
414
|
- (void)captureImageWithCompletionHander:(void(^)(id data, id initialData, CIRectangleFeature *rectangleFeature))completionHandler
|
|
415
415
|
{
|
|
416
|
-
|
|
416
|
+
NSLog(@"[IPDFCameraViewController] captureImageWithCompletionHander called, _isCapturing=%@", _isCapturing ? @"YES" : @"NO");
|
|
417
|
+
|
|
418
|
+
if (_isCapturing) {
|
|
419
|
+
NSLog(@"[IPDFCameraViewController] Already capturing, ignoring request");
|
|
420
|
+
return;
|
|
421
|
+
}
|
|
417
422
|
|
|
418
423
|
__weak typeof(self) weakSelf = self;
|
|
419
424
|
|