ngx-scandoc 1.3.4 → 1.3.5

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.
@@ -2524,6 +2524,9 @@ class ScanComponent extends BaseComponent {
2524
2524
  this.showDialog = true;
2525
2525
  this.cd.detectChanges();
2526
2526
  }
2527
+ // reset manual scan popup interval
2528
+ this.verificationErrorSent = false;
2529
+ this.startTime = Date.now();
2527
2530
  this.displayInfo = 'scandoc.info.turn';
2528
2531
  }
2529
2532
  }
@@ -2576,40 +2579,16 @@ class ScanComponent extends BaseComponent {
2576
2579
  // save current image after 10sec
2577
2580
  let MANUAL_INTERVAL = this.scanProvider.config.manualScanDelay;
2578
2581
  const diff = (Date.now() - this.startTime) / 1000;
2579
- if (diff > MANUAL_INTERVAL &&
2580
- !this.verificationErrorSent
2581
- //&&
2582
- //this.scanProvider.config.development
2583
- ) {
2582
+ const showDialog = diff > MANUAL_INTERVAL;
2583
+ console.log('Mdiff', diff, showDialog, this.verificationErrorSent);
2584
+ if (showDialog && !this.verificationErrorSent) {
2584
2585
  this.verificationErrorSent = true;
2585
2586
  console.warn('[HANDLE ERROR]');
2586
2587
  this.zone.run(() => {
2587
- // const ref = this.snackBar.open(
2588
- // this.translate.instant('scandoc.manual'),
2589
- // this.translate.instant('scandoc.yes'),
2590
- // {
2591
- // duration: 10000,
2592
- // viewContainerRef: this.view,
2593
- // }
2594
- // );
2595
- // this.__subs(ref.onAction()).subscribe((resp) => {
2596
- // this.manualMode(type);
2597
- // });
2598
- if (!this.scanSecondSide) {
2599
- this.promptManual = true;
2600
- // MANUAL_INTERVAL += 10;
2601
- }
2602
- // this.verificationErrorSent = false;
2588
+ // if (!this.scanSecondSide) {
2589
+ this.promptManual = true;
2590
+ // }
2603
2591
  this.startTime = Date.now();
2604
- //this.promptManual = true;
2605
- // this.dialogs.promptManual().subscribe((resp: any) => {
2606
- // console.warn(resp);
2607
- // if (resp) {
2608
- // this.manualMode(type);
2609
- // }
2610
- // this.startTime = Date.now();
2611
- // this.verificationErrorSent = false;
2612
- // });
2613
2592
  });
2614
2593
  // this.verificationErrorSent = true;
2615
2594
  // const dataUrl = this.handleBitmapImage(img.bitmap);