Skip to content

Commit 12fb159

Browse files
committed
Added captureMultiple prop
1 parent 4b8a662 commit 12fb159

File tree

4 files changed

+7
-1
lines changed

4 files changed

+7
-1
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ class YourComponent extends Component {
8585
| contrast | `1` | `float` | Increase or decrease camera contrast. Normal as default |
8686
| quality | `0.8` | `float` | Image compression. Reduces both image size and quality |
8787
| useBase64 | `false` | `bool` | If base64 representation should be passed instead of image uri's |
88+
| captureMultiple | `false` | `bool` | Keeps the scanner on after a successful capture |
8889

8990
## Manual capture
9091

ios/DocumentScannerView.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
@property (assign, nonatomic) NSInteger stableCounter;
1010
@property (nonatomic, assign) float quality;
1111
@property (nonatomic, assign) BOOL useBase64;
12+
@property (nonatomic, assign) BOOL captureMultiple;
1213

1314
- (void) capture;
1415

ios/DocumentScannerView.m

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,10 @@ - (void) capture {
7676
@"rectangleCoordinates": rectangleCoordinates });
7777
}
7878
}
79-
[self stop];
79+
80+
if (!self.captureMultiple) {
81+
[self stop];
82+
}
8083
}];
8184

8285
}

ios/RNPdfScannerManager.m

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ - (dispatch_queue_t)methodQueue
2323
RCT_EXPORT_VIEW_PROPERTY(enableTorch, BOOL)
2424
RCT_EXPORT_VIEW_PROPERTY(useFrontCam, BOOL)
2525
RCT_EXPORT_VIEW_PROPERTY(useBase64, BOOL)
26+
RCT_EXPORT_VIEW_PROPERTY(captureMultiple, BOOL)
2627
RCT_EXPORT_VIEW_PROPERTY(detectionCountBeforeCapture, NSInteger)
2728
RCT_EXPORT_VIEW_PROPERTY(detectionRefreshRateInMS, NSInteger)
2829
RCT_EXPORT_VIEW_PROPERTY(saturation, float)

0 commit comments

Comments
 (0)