scandoc-ai-components 0.0.65 → 0.0.67
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +10 -12
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -11248,20 +11248,18 @@ class ExtractorVideo {
|
|
|
11248
11248
|
}
|
|
11249
11249
|
updateRectangleOverlay = async () => {
|
|
11250
11250
|
const margins = await this.getCameraMargins();
|
|
11251
|
-
const video = document.getElementById('ScanDocAIVideoElement');
|
|
11252
11251
|
const rectangle = document.querySelector('.desktopRectangle');
|
|
11253
|
-
|
|
11254
|
-
|
|
11252
|
+
const video = document.getElementById('ScanDocAIVideoElement');
|
|
11253
|
+
if (!rectangle || !video) return;
|
|
11254
|
+
const rect = video.getBoundingClientRect(); // the visible size
|
|
11255
11255
|
const width = rect.width;
|
|
11256
11256
|
const height = rect.height;
|
|
11257
11257
|
const leftPx = margins.leftPct * width;
|
|
11258
11258
|
const rightPx = margins.rightPct * width;
|
|
11259
11259
|
const topPx = margins.topPct * height;
|
|
11260
11260
|
const bottomPx = margins.bottomPct * height;
|
|
11261
|
-
|
|
11262
|
-
|
|
11263
|
-
rectangle.style.left = `${rect.left + leftPx}px`;
|
|
11264
|
-
rectangle.style.top = `${rect.top + topPx}px`;
|
|
11261
|
+
rectangle.style.left = `${leftPx}px`;
|
|
11262
|
+
rectangle.style.top = `${topPx}px`;
|
|
11265
11263
|
rectangle.style.width = `${width - leftPx - rightPx}px`;
|
|
11266
11264
|
rectangle.style.height = `${height - topPx - bottomPx}px`;
|
|
11267
11265
|
};
|
|
@@ -11506,14 +11504,14 @@ class ExtractorVideo {
|
|
|
11506
11504
|
}
|
|
11507
11505
|
|
|
11508
11506
|
.desktopRectangle {
|
|
11509
|
-
position:
|
|
11510
|
-
|
|
11507
|
+
position: absolute;
|
|
11508
|
+
top: 0; left: 0; right: 0; bottom: 0;
|
|
11511
11509
|
border: 5px dashed #5078bb;
|
|
11512
|
-
|
|
11510
|
+
border-radius: 30px;
|
|
11513
11511
|
pointer-events: none;
|
|
11514
|
-
z-index:
|
|
11512
|
+
z-index: 3;
|
|
11515
11513
|
}
|
|
11516
|
-
|
|
11514
|
+
|
|
11517
11515
|
.backgroundOverlay {
|
|
11518
11516
|
position: absolute;
|
|
11519
11517
|
top: 0;
|