kfb-view 2.4.0 → 2.4.1
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/package.json
CHANGED
|
@@ -60,8 +60,8 @@ export class ViewerCommon extends EventEmitter {
|
|
|
60
60
|
{x: rect.x + rect.width, y: rect.y + rect.height})[4];
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
-
moveToLabel(point) {
|
|
64
|
-
this.viewport.panTo(new Point(point.x, point.y),
|
|
63
|
+
moveToLabel(point, flag = false) {
|
|
64
|
+
this.viewport.panTo(new Point(point.x, point.y), flag);
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
/**
|
|
@@ -110,10 +110,12 @@ export class Tailoring extends ViewerCommon {
|
|
|
110
110
|
ctx.beginPath();
|
|
111
111
|
ctx.fillStyle = this.color;
|
|
112
112
|
ctx.font = '18px Arial';
|
|
113
|
+
const width = (rightTop.x - leftTop.x).toFixed(2) / 1;
|
|
114
|
+
const height = (rightBottom.y - rightTop.y).toFixed(2) / 1;
|
|
113
115
|
ctx.fillText(
|
|
114
116
|
this.contents?.[2] ?
|
|
115
|
-
this.contents[2](
|
|
116
|
-
(`区域大小为:${
|
|
117
|
+
this.contents[2](width, height) :
|
|
118
|
+
(`区域大小为:${width}*${height}`),
|
|
117
119
|
leftTop.x, leftTop.y - 50);
|
|
118
120
|
ctx.fillText(this.contents?.[0] ?? `双击区域内表示完成截图`, leftTop.x,
|
|
119
121
|
leftTop.y - 30);
|