Skip to content

Commit

Permalink
Merge pull request #196 from tw-mosip/injiver-try-5x-zoom-slider
Browse files Browse the repository at this point in the history
Try 5x zoom slider
  • Loading branch information
swatigoel authored Oct 10, 2024
2 parents 2e88eb2 + d991fc3 commit 1423d28
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
CONSTRAINTS_IDEAL_WIDTH,
FRAME_PROCESS_INTERVAL_MS,
INITIAL_ZOOM_LEVEL,
MARKS_COUNT,
ZOOM_STEP_PERCENTAGE,
ScanSessionExpiryTime,
THROTTLE_FRAMES_PER_SEC,
} from "../../../utils/config";
Expand Down Expand Up @@ -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_PERCENTAGE}) translateZ(0)`,
willChange: "transform",
WebkitTransform: `scale(${1 + zoomLevel / 10}) translateZ(0)`,
WebkitTransform: `scale(${1 + zoomLevel / ZOOM_STEP_PERCENTAGE}) translateZ(0)`,
}}
/>
</div>
Expand Down
2 changes: 1 addition & 1 deletion inji-verify/src/utils/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 1423d28

Please sign in to comment.