From 9bb96d8f07c2cf1b16d7cfb3917757c9ff52ef16 Mon Sep 17 00:00:00 2001
From: tams sokari
Date: Tue, 25 Oct 2022 15:19:00 +0100
Subject: [PATCH] fix: fix clip-path regression (#10)
---
smart-camera-web.js | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/smart-camera-web.js b/smart-camera-web.js
index 9d5c528a..e732d142 100644
--- a/smart-camera-web.js
+++ b/smart-camera-web.js
@@ -1,6 +1,6 @@
'use strict';
-const VERSION = '1.0.0-beta.9';
+const VERSION = '1.0.0-beta.10';
const DEFAULT_NO_OF_LIVENESS_FRAMES = 8;
@@ -262,10 +262,17 @@ template.innerHTML = `
.video-container video {
min-height: 100%;
- clip-path: ellipse(101px 118px);
transform: scaleX(-1) translateX(50%) translateY(-50%);
}
+ .video-container .video {
+ background-color: black;
+ position: absolute;
+ left: 50%;
+ height: calc(100% - 6px);
+ clip-path: ellipse(101px 118px);
+ }
+
.id-video-container {
min-height: calc((2 * 10rem) + 198px);
}
@@ -381,6 +388,8 @@ template.innerHTML = `
+
+
@@ -742,7 +751,7 @@ class SmartCameraWeb extends HTMLElement {
this.backOfIDReviewScreen = this.shadowRoot.querySelector('#back-of-id-review-screen');
this.thanksScreen = this.shadowRoot.querySelector('#thanks-screen');
- this.videoContainer = this.shadowRoot.querySelector('.video-container');
+ this.videoContainer = this.shadowRoot.querySelector('.video-container > .video');
this.smileCTA = this.shadowRoot.querySelector('#smile-cta');
this.imageOutline = this.shadowRoot.querySelector('#image-outline path');
this.startImageCapture = this.shadowRoot.querySelector('#start-image-capture');