kfb-view 2.1.17 → 2.1.18
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/.idea/workspace.xml +36 -42
- package/lib/kfb-view.js +1 -1
- package/package.json +1 -1
- package/src/components/shape/index.js +9 -7
package/package.json
CHANGED
|
@@ -76,11 +76,12 @@ export class Shape extends ViewerCommon {
|
|
|
76
76
|
this.labelList.forEach((item) => {
|
|
77
77
|
if (item.show === false) return;
|
|
78
78
|
if (!this[item.tool]) return;
|
|
79
|
-
|
|
79
|
+
if (!this.isInCanvas(item.region)) return;
|
|
80
|
+
/* const point = this.imageToViewerElementCoordinates(item.points[0].x,
|
|
80
81
|
item.points[0].y);
|
|
81
82
|
if ((point.x > this.canvas.width ||
|
|
82
83
|
point.y > this.canvas.height ||
|
|
83
|
-
point.x < 0 || point.y < 0)) return
|
|
84
|
+
point.x < 0 || point.y < 0)) return;*/
|
|
84
85
|
const key = `${item.strokeStyle ?? ''}_${item.lineWidth ??
|
|
85
86
|
''}_${item.fillStyle ?? ''}`;
|
|
86
87
|
const regionKey = `${item.strokeStyle ?? ''}_${item.lineWidth ?? ''}`;
|
|
@@ -133,11 +134,12 @@ export class Shape extends ViewerCommon {
|
|
|
133
134
|
regionLabelList.forEach((item) => {
|
|
134
135
|
if (item.show === false) return;
|
|
135
136
|
if (!this[item.tool]) return;
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
point.
|
|
140
|
-
|
|
137
|
+
if (!this.isInCanvas(item.region)) return;
|
|
138
|
+
/* const point = this.imageToViewerElementCoordinates(item.points[0].x,
|
|
139
|
+
item.points[0].y);
|
|
140
|
+
if ((point.x > this.canvas.width ||
|
|
141
|
+
point.y > this.canvas.height ||
|
|
142
|
+
point.x < 0 || point.y < 0)) return;*/
|
|
141
143
|
this.combination.setContent(this.canvas, item);
|
|
142
144
|
this.combination.draw({
|
|
143
145
|
points: this.imageToViewerElementPoints(item.points),
|