scandoc-ai-components 0.0.82 → 0.0.83
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 +13 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -11259,7 +11259,18 @@ class ExtractorVideo {
|
|
|
11259
11259
|
} else {
|
|
11260
11260
|
this.unsupportedDocCount = 0;
|
|
11261
11261
|
}
|
|
11262
|
-
|
|
11262
|
+
const imageSide = response["Side"];
|
|
11263
|
+
const isAlreadyScanned = this.extractionImages[imageSide] !== undefined;
|
|
11264
|
+
const scannedSides = Object.keys(this.extractionImages).length;
|
|
11265
|
+
|
|
11266
|
+
// Show feedback only if both sides are not yet scanned
|
|
11267
|
+
// Avoid overwriting "Turn to the other side" until second side appears
|
|
11268
|
+
if (scannedSides < 1) {
|
|
11269
|
+
this.showMessage(response["Info"]); // normal feedback before first side
|
|
11270
|
+
} else if (!isAlreadyScanned && scannedSides === 1) {
|
|
11271
|
+
// We are seeing a new side after 1 side has already been scanned
|
|
11272
|
+
this.showMessage(response["Info"]); // allow resuming feedback (if desired)
|
|
11273
|
+
}
|
|
11263
11274
|
//
|
|
11264
11275
|
if ("DetectedBlurValue" in response) {
|
|
11265
11276
|
this.pastBlurValues.push(response["DetectedBlurValue"]);
|
|
@@ -11401,6 +11412,7 @@ class ExtractorVideo {
|
|
|
11401
11412
|
}
|
|
11402
11413
|
}
|
|
11403
11414
|
showMessage(message) {
|
|
11415
|
+
if (!message || message.trim() === "") return;
|
|
11404
11416
|
if (this.lastMessage === message) return;
|
|
11405
11417
|
this.lastMessage = message;
|
|
11406
11418
|
const messageElement = document.getElementById("ScanDocAIMessage");
|