scandoc-ai-components 0.0.76 → 0.0.77
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 +9 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -11369,6 +11369,7 @@ class ExtractorVideo {
|
|
|
11369
11369
|
this.adjustOverlayPosition();
|
|
11370
11370
|
});
|
|
11371
11371
|
window.addEventListener('resize', () => this.adjustOverlayPosition());
|
|
11372
|
+
setTimeout(() => this.adjustOverlayPosition(), 500);
|
|
11372
11373
|
this.scanStartTime = Date.now(); // Reset timer
|
|
11373
11374
|
setTimeout(() => this.analyzeVideoStream(), ExtractorVideo.FREQUENCY_MS);
|
|
11374
11375
|
this.showMessage("Starting scanning");
|
|
@@ -11418,10 +11419,14 @@ class ExtractorVideo {
|
|
|
11418
11419
|
}
|
|
11419
11420
|
const offsetX = (container.clientWidth - scaleWidth) / 2;
|
|
11420
11421
|
const offsetY = (container.clientHeight - scaleHeight) / 2;
|
|
11421
|
-
|
|
11422
|
-
|
|
11423
|
-
|
|
11424
|
-
|
|
11422
|
+
const paddingRatio = 0.05;
|
|
11423
|
+
const minPadding = 16;
|
|
11424
|
+
const padX = Math.max(scaleWidth * paddingRatio, minPadding);
|
|
11425
|
+
const padY = Math.max(scaleHeight * paddingRatio, minPadding);
|
|
11426
|
+
overlay.style.left = `${offsetX + padX}px`;
|
|
11427
|
+
overlay.style.top = `${offsetY + padY}px`;
|
|
11428
|
+
overlay.style.width = `${scaleWidth - padX * 2}px`;
|
|
11429
|
+
overlay.style.height = `${scaleHeight - padY * 2}px`;
|
|
11425
11430
|
}
|
|
11426
11431
|
getHTML() {
|
|
11427
11432
|
const cfgValues = (0,_config__WEBPACK_IMPORTED_MODULE_1__.getScanDocAIConfigValues)();
|