kfb-view 2.3.6 → 2.3.8
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 +21 -20
- package/lib/kfb-view.js +1 -1
- package/package.json +1 -1
- package/src/components/tailoring/index.js +5 -3
package/package.json
CHANGED
|
@@ -45,7 +45,8 @@ export class Tailoring extends ViewerCommon {
|
|
|
45
45
|
this.stopTailoring();
|
|
46
46
|
} else {
|
|
47
47
|
this.color = color || '#FFF';
|
|
48
|
-
this.contents = contents?.length
|
|
48
|
+
this.contents = contents?.length ?
|
|
49
|
+
contents :
|
|
49
50
|
['双击区域内表示完成截图', '双击区域外或按ESC表示取消截图'];
|
|
50
51
|
this.change();
|
|
51
52
|
}
|
|
@@ -110,8 +111,9 @@ export class Tailoring extends ViewerCommon {
|
|
|
110
111
|
ctx.fillStyle = this.color;
|
|
111
112
|
ctx.font = '18px Arial';
|
|
112
113
|
ctx.fillText(
|
|
113
|
-
this.contents?.[
|
|
114
|
-
|
|
114
|
+
this.contents?.[2] ?
|
|
115
|
+
this.contents[2](rightTop.x - leftTop.x, rightBottom.y - rightTop.y) :
|
|
116
|
+
(`区域大小为:${rightTop.x - leftTop.x}*${rightBottom.y - rightTop.y}`),
|
|
115
117
|
leftTop.x, leftTop.y - 50);
|
|
116
118
|
ctx.fillText(this.contents?.[0] ?? `双击区域内表示完成截图`, leftTop.x,
|
|
117
119
|
leftTop.y - 30);
|