Skip to content

Commit

Permalink
Fix document capture preview screen not showing on larger screens (#272)
Browse files Browse the repository at this point in the history
  • Loading branch information
ayinloya authored Jun 21, 2024
1 parent 5de01d2 commit 43dce44
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -357,11 +357,13 @@ class DocumentCapture extends HTMLElement {
const height = canvas.width / (video.videoWidth / video.videoHeight);
canvas.height = height;
context.drawImage(video, 0, 0, canvas.width, canvas.height);
const image = canvas.toDataURL('image/jpeg');

return {
image: canvas.toDataURL('image/jpeg'),
image,
originalHeight: canvas.height,
originalWidth: canvas.width,
previewImage: image,
...this.idCardRegion,
};
}
Expand Down

0 comments on commit 43dce44

Please sign in to comment.