dytools-capture-engine 1.2.4 → 1.2.6
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.cjs +1 -9
- package/dist/index.js +1 -9
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -356,10 +356,6 @@ var CaptureZoneBase = class {
|
|
|
356
356
|
set filterRegex(value) {
|
|
357
357
|
if (value === this._filterRegex) return;
|
|
358
358
|
if ((value === void 0 || value === null || value === "") && (this._filterRegex === void 0 || this._filterRegex === null || this._filterRegex === "")) return;
|
|
359
|
-
if (!this.isValidRegex(value)) {
|
|
360
|
-
console.error(`Invalid filter regex: ${value}`);
|
|
361
|
-
return;
|
|
362
|
-
}
|
|
363
359
|
const oldFilterRegex = this._filterRegex;
|
|
364
360
|
this._filterRegex = value;
|
|
365
361
|
this.emitZoneEvent(CaptureZoneEventType.ZoneFilterRegexChanged, { oldFilterRegex, newFilterRegex: value });
|
|
@@ -370,10 +366,6 @@ var CaptureZoneBase = class {
|
|
|
370
366
|
set outputRegex(value) {
|
|
371
367
|
if (value === this._outputRegex) return;
|
|
372
368
|
if ((value === void 0 || value === null || value === "") && (this._outputRegex === void 0 || this._outputRegex === null || this._outputRegex === "")) return;
|
|
373
|
-
if (!this.isValidRegex(value)) {
|
|
374
|
-
console.error(`Invalid output regex: ${value}`);
|
|
375
|
-
return;
|
|
376
|
-
}
|
|
377
369
|
const oldOutputRegex = this._outputRegex;
|
|
378
370
|
this._outputRegex = value;
|
|
379
371
|
this.emitZoneEvent(CaptureZoneEventType.ZoneOutputRegexChanged, { oldOutputRegex, newOutputRegex: value });
|
|
@@ -723,7 +715,7 @@ var AnchorZone = class extends CaptureZoneBase {
|
|
|
723
715
|
let minOpacity = 0.25;
|
|
724
716
|
let percentThroughArray = (i + 1) / this.children.length;
|
|
725
717
|
let opacity = maxOpacity - (maxOpacity - minOpacity) * percentThroughArray;
|
|
726
|
-
let color = `rgba(
|
|
718
|
+
let color = `rgba(${cycle}, 128, 255, ${opacity.toFixed(2)})`;
|
|
727
719
|
const polygon = child.rect.move(vector).toPolygon().points;
|
|
728
720
|
this.ocrOverlayIds.push(this.canvasManager?.addPolygon(polygon, color, false));
|
|
729
721
|
}
|
package/dist/index.js
CHANGED
|
@@ -340,10 +340,6 @@ var CaptureZoneBase = class {
|
|
|
340
340
|
set filterRegex(value) {
|
|
341
341
|
if (value === this._filterRegex) return;
|
|
342
342
|
if ((value === void 0 || value === null || value === "") && (this._filterRegex === void 0 || this._filterRegex === null || this._filterRegex === "")) return;
|
|
343
|
-
if (!this.isValidRegex(value)) {
|
|
344
|
-
console.error(`Invalid filter regex: ${value}`);
|
|
345
|
-
return;
|
|
346
|
-
}
|
|
347
343
|
const oldFilterRegex = this._filterRegex;
|
|
348
344
|
this._filterRegex = value;
|
|
349
345
|
this.emitZoneEvent(CaptureZoneEventType.ZoneFilterRegexChanged, { oldFilterRegex, newFilterRegex: value });
|
|
@@ -354,10 +350,6 @@ var CaptureZoneBase = class {
|
|
|
354
350
|
set outputRegex(value) {
|
|
355
351
|
if (value === this._outputRegex) return;
|
|
356
352
|
if ((value === void 0 || value === null || value === "") && (this._outputRegex === void 0 || this._outputRegex === null || this._outputRegex === "")) return;
|
|
357
|
-
if (!this.isValidRegex(value)) {
|
|
358
|
-
console.error(`Invalid output regex: ${value}`);
|
|
359
|
-
return;
|
|
360
|
-
}
|
|
361
353
|
const oldOutputRegex = this._outputRegex;
|
|
362
354
|
this._outputRegex = value;
|
|
363
355
|
this.emitZoneEvent(CaptureZoneEventType.ZoneOutputRegexChanged, { oldOutputRegex, newOutputRegex: value });
|
|
@@ -707,7 +699,7 @@ var AnchorZone = class extends CaptureZoneBase {
|
|
|
707
699
|
let minOpacity = 0.25;
|
|
708
700
|
let percentThroughArray = (i + 1) / this.children.length;
|
|
709
701
|
let opacity = maxOpacity - (maxOpacity - minOpacity) * percentThroughArray;
|
|
710
|
-
let color = `rgba(
|
|
702
|
+
let color = `rgba(${cycle}, 128, 255, ${opacity.toFixed(2)})`;
|
|
711
703
|
const polygon = child.rect.move(vector).toPolygon().points;
|
|
712
704
|
this.ocrOverlayIds.push(this.canvasManager?.addPolygon(polygon, color, false));
|
|
713
705
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dytools-capture-engine",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.6",
|
|
4
4
|
"description": "An editor allowing the creation of templates for ocr capture.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"typescript": "^5.9.3"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"dytools-canvas-engine": "^1.1.
|
|
27
|
+
"dytools-canvas-engine": "^1.1.3",
|
|
28
28
|
"dytools-geometry": "^1.0.0",
|
|
29
29
|
"dytools-result": "^1.0.1"
|
|
30
30
|
}
|