From 967519a5ec60ae0e8e62115c83fcec0f475f71cc Mon Sep 17 00:00:00 2001 From: dhanabalan Date: Mon, 27 Oct 2025 11:42:55 +0530 Subject: [PATCH] modified logic in ocr --- resources/views/fields/camera-capture.blade.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/resources/views/fields/camera-capture.blade.php b/resources/views/fields/camera-capture.blade.php index a852c64..415a0bb 100644 --- a/resources/views/fields/camera-capture.blade.php +++ b/resources/views/fields/camera-capture.blade.php @@ -729,6 +729,7 @@ function cameraCapture() {
Switch Camera + Retake Capture Photo Verify
@@ -839,7 +840,7 @@ function cameraCapture() { // this.stopDetection(); // }, -capturePhoto() { + capturePhoto() { const video = this.$refs.video; const canvas = this.$refs.canvas; const snapshot = this.$refs.snapshot; @@ -932,6 +933,14 @@ capturePhoto() { } }, + + async retakePhoto() { + this.photoTaken = false; + this.$refs.snapshot.classList.add('hidden'); + this.$refs.video.classList.remove('hidden'); + await this.initCamera(); + }, + startDetection() { if (this.textDetectionInterval) clearInterval(this.textDetectionInterval); this.textDetectionInterval = setInterval(() => this.detectText(), 1000);