scandoc-ai-components 0.0.65 → 0.0.66
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 -20
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -11248,22 +11248,12 @@ 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
|
-
if (!
|
|
11254
|
-
|
|
11255
|
-
|
|
11256
|
-
|
|
11257
|
-
|
|
11258
|
-
const rightPx = margins.rightPct * width;
|
|
11259
|
-
const topPx = margins.topPct * height;
|
|
11260
|
-
const bottomPx = margins.bottomPct * height;
|
|
11261
|
-
|
|
11262
|
-
// Position rectangle in actual pixels (not %)
|
|
11263
|
-
rectangle.style.left = `${rect.left + leftPx}px`;
|
|
11264
|
-
rectangle.style.top = `${rect.top + topPx}px`;
|
|
11265
|
-
rectangle.style.width = `${width - leftPx - rightPx}px`;
|
|
11266
|
-
rectangle.style.height = `${height - topPx - bottomPx}px`;
|
|
11252
|
+
if (!rectangle) return;
|
|
11253
|
+
rectangle.style.top = `${margins.topPct * 100}%`;
|
|
11254
|
+
rectangle.style.bottom = `${margins.bottomPct * 100}%`;
|
|
11255
|
+
rectangle.style.left = `${margins.leftPct * 100}%`;
|
|
11256
|
+
rectangle.style.right = `${margins.rightPct * 100}%`;
|
|
11267
11257
|
};
|
|
11268
11258
|
async analyzeVideoStream() {
|
|
11269
11259
|
if (!this.isRunning) {
|
|
@@ -11506,14 +11496,14 @@ class ExtractorVideo {
|
|
|
11506
11496
|
}
|
|
11507
11497
|
|
|
11508
11498
|
.desktopRectangle {
|
|
11509
|
-
position:
|
|
11510
|
-
|
|
11499
|
+
position: absolute;
|
|
11500
|
+
top: 0; left: 0; right: 0; bottom: 0;
|
|
11511
11501
|
border: 5px dashed #5078bb;
|
|
11512
|
-
|
|
11502
|
+
border-radius: 30px;
|
|
11513
11503
|
pointer-events: none;
|
|
11514
|
-
z-index:
|
|
11504
|
+
z-index: 3;
|
|
11515
11505
|
}
|
|
11516
|
-
|
|
11506
|
+
|
|
11517
11507
|
.backgroundOverlay {
|
|
11518
11508
|
position: absolute;
|
|
11519
11509
|
top: 0;
|