From 149008a8e8ccf493ad2ae596f09d0a222b789977 Mon Sep 17 00:00:00 2001 From: Sreenadh S <32409698+sree96@users.noreply.github.com> Date: Thu, 10 Oct 2024 18:54:24 +0530 Subject: [PATCH 1/2] [NOJIRA] - adding 5x zoom slider for scan for testing Signed-off-by: Sreenadh S <32409698+sree96@users.noreply.github.com> --- .../src/components/Home/VerificationSection/QrScanner.tsx | 6 +++--- inji-verify/src/utils/config.ts | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/inji-verify/src/components/Home/VerificationSection/QrScanner.tsx b/inji-verify/src/components/Home/VerificationSection/QrScanner.tsx index c09f0262..86817a09 100644 --- a/inji-verify/src/components/Home/VerificationSection/QrScanner.tsx +++ b/inji-verify/src/components/Home/VerificationSection/QrScanner.tsx @@ -6,7 +6,7 @@ import { CONSTRAINTS_IDEAL_WIDTH, FRAME_PROCESS_INTERVAL_MS, INITIAL_ZOOM_LEVEL, - MARKS_COUNT, + ZOOM_STEP, ScanSessionExpiryTime, THROTTLE_FRAMES_PER_SEC, } from "../../../utils/config"; @@ -222,9 +222,9 @@ function QrScanner() { ref={videoRef} className="object-cover rounded-lg" style={{ - transform: `scale(${1 + zoomLevel / 10}) translateZ(0)`, + transform: `scale(${1 + zoomLevel / ZOOM_STEP}) translateZ(0)`, willChange: "transform", - WebkitTransform: `scale(${1 + zoomLevel / 10}) translateZ(0)`, + WebkitTransform: `scale(${1 + zoomLevel / ZOOM_STEP}) translateZ(0)`, }} /> diff --git a/inji-verify/src/utils/config.ts b/inji-verify/src/utils/config.ts index ebf71363..2b055e0f 100644 --- a/inji-verify/src/utils/config.ts +++ b/inji-verify/src/utils/config.ts @@ -113,7 +113,7 @@ export const InternetConnectivityCheckTimeout = isNaN(Number.parseInt(window._en export const OvpQrHeader = window._env_.OVP_QR_HEADER; -export const MARKS_COUNT = 11; +export const ZOOM_STEP_PERCENTAGE = 50; export const INITIAL_ZOOM_LEVEL = 0; export const CONSTRAINTS_IDEAL_WIDTH = 2560; export const CONSTRAINTS_IDEAL_HEIGHT = 1440; From d991fc314febb17b0e65a5977c2ff8c3260b0b48 Mon Sep 17 00:00:00 2001 From: Sreenadh S <32409698+sree96@users.noreply.github.com> Date: Thu, 10 Oct 2024 18:56:08 +0530 Subject: [PATCH 2/2] [NOJIRA] - adding 5x zoom slider for scan for testing Signed-off-by: Sreenadh S <32409698+sree96@users.noreply.github.com> --- .../src/components/Home/VerificationSection/QrScanner.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/inji-verify/src/components/Home/VerificationSection/QrScanner.tsx b/inji-verify/src/components/Home/VerificationSection/QrScanner.tsx index 86817a09..abaf5c2e 100644 --- a/inji-verify/src/components/Home/VerificationSection/QrScanner.tsx +++ b/inji-verify/src/components/Home/VerificationSection/QrScanner.tsx @@ -6,7 +6,7 @@ import { CONSTRAINTS_IDEAL_WIDTH, FRAME_PROCESS_INTERVAL_MS, INITIAL_ZOOM_LEVEL, - ZOOM_STEP, + ZOOM_STEP_PERCENTAGE, ScanSessionExpiryTime, THROTTLE_FRAMES_PER_SEC, } from "../../../utils/config"; @@ -222,9 +222,9 @@ function QrScanner() { ref={videoRef} className="object-cover rounded-lg" style={{ - transform: `scale(${1 + zoomLevel / ZOOM_STEP}) translateZ(0)`, + transform: `scale(${1 + zoomLevel / ZOOM_STEP_PERCENTAGE}) translateZ(0)`, willChange: "transform", - WebkitTransform: `scale(${1 + zoomLevel / ZOOM_STEP}) translateZ(0)`, + WebkitTransform: `scale(${1 + zoomLevel / ZOOM_STEP_PERCENTAGE}) translateZ(0)`, }} />