bhd-components 0.9.1 → 0.9.2
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/{100c4e1e.esm.es5.development.js → a5565b8a.esm.es5.development.js} +9674 -2548
- package/dist/deb6cc9b.esm.es5.production.js +485 -0
- package/dist/index.esm.es5.development.css +379 -0
- package/dist/index.esm.es5.development.js +3871 -6326
- package/dist/index.esm.es5.production.css +1 -1
- package/dist/index.esm.es5.production.js +1 -1
- package/es2017/customerService/index.js +1 -1
- package/es2017/customerService/js-screen-shot/assets/less/screen-shot.less +478 -0
- package/es2017/customerService/js-screen-shot/lib/common-methods/CanvasPatch.d.ts +1 -0
- package/es2017/customerService/js-screen-shot/lib/common-methods/CanvasPatch.js +15 -0
- package/es2017/customerService/js-screen-shot/lib/common-methods/DeviceTypeVerif.d.ts +2 -0
- package/es2017/customerService/js-screen-shot/lib/common-methods/DeviceTypeVerif.js +32 -0
- package/es2017/customerService/js-screen-shot/lib/common-methods/FixedData.d.ts +11 -0
- package/es2017/customerService/js-screen-shot/lib/common-methods/FixedData.js +17 -0
- package/es2017/customerService/js-screen-shot/lib/common-methods/GetBrushSelectedName.d.ts +5 -0
- package/es2017/customerService/js-screen-shot/lib/common-methods/GetBrushSelectedName.js +18 -0
- package/es2017/customerService/js-screen-shot/lib/common-methods/GetCanvasImgData.d.ts +4 -0
- package/es2017/customerService/js-screen-shot/lib/common-methods/GetCanvasImgData.js +25 -0
- package/es2017/customerService/js-screen-shot/lib/common-methods/GetColor.d.ts +1 -0
- package/es2017/customerService/js-screen-shot/lib/common-methods/GetColor.js +41 -0
- package/es2017/customerService/js-screen-shot/lib/common-methods/GetSelectedCalssName.d.ts +1 -0
- package/es2017/customerService/js-screen-shot/lib/common-methods/GetSelectedCalssName.js +23 -0
- package/es2017/customerService/js-screen-shot/lib/common-methods/GetToolRelativePosition.d.ts +7 -0
- package/es2017/customerService/js-screen-shot/lib/common-methods/GetToolRelativePosition.js +9 -0
- package/es2017/customerService/js-screen-shot/lib/common-methods/ImgScaling.d.ts +11 -0
- package/es2017/customerService/js-screen-shot/lib/common-methods/ImgScaling.js +41 -0
- package/es2017/customerService/js-screen-shot/lib/common-methods/SaveBorderArrInfo.d.ts +8 -0
- package/es2017/customerService/js-screen-shot/lib/common-methods/SaveBorderArrInfo.js +125 -0
- package/es2017/customerService/js-screen-shot/lib/common-methods/SaveCanvasToBase64.d.ts +1 -0
- package/es2017/customerService/js-screen-shot/lib/common-methods/SaveCanvasToBase64.js +37 -0
- package/es2017/customerService/js-screen-shot/lib/common-methods/SaveCanvasToImage.d.ts +1 -0
- package/es2017/customerService/js-screen-shot/lib/common-methods/SaveCanvasToImage.js +26 -0
- package/es2017/customerService/js-screen-shot/lib/common-methods/SelectColor.d.ts +1 -0
- package/es2017/customerService/js-screen-shot/lib/common-methods/SelectColor.js +6 -0
- package/es2017/customerService/js-screen-shot/lib/common-methods/SelectTextSize.d.ts +5 -0
- package/es2017/customerService/js-screen-shot/lib/common-methods/SelectTextSize.js +26 -0
- package/es2017/customerService/js-screen-shot/lib/common-methods/SetBrushSize.d.ts +14 -0
- package/es2017/customerService/js-screen-shot/lib/common-methods/SetBrushSize.js +50 -0
- package/es2017/customerService/js-screen-shot/lib/common-methods/SetSelectedClassName.d.ts +7 -0
- package/es2017/customerService/js-screen-shot/lib/common-methods/SetSelectedClassName.js +28 -0
- package/es2017/customerService/js-screen-shot/lib/common-methods/TakeOutHistory.d.ts +1 -0
- package/es2017/customerService/js-screen-shot/lib/common-methods/TakeOutHistory.js +20 -0
- package/es2017/customerService/js-screen-shot/lib/common-methods/UpdateContainerMouseStyle.d.ts +1 -0
- package/es2017/customerService/js-screen-shot/lib/common-methods/UpdateContainerMouseStyle.js +10 -0
- package/es2017/customerService/js-screen-shot/lib/common-methods/ZoomCutOutBoxPosition.d.ts +17 -0
- package/es2017/customerService/js-screen-shot/lib/common-methods/ZoomCutOutBoxPosition.js +92 -0
- package/es2017/customerService/js-screen-shot/lib/config/Toolbar.d.ts +5 -0
- package/es2017/customerService/js-screen-shot/lib/config/Toolbar.js +46 -0
- package/es2017/customerService/js-screen-shot/lib/main-entrance/CreateDom.d.ts +24 -0
- package/es2017/customerService/js-screen-shot/lib/main-entrance/CreateDom.js +304 -0
- package/es2017/customerService/js-screen-shot/lib/main-entrance/InitData.d.ts +78 -0
- package/es2017/customerService/js-screen-shot/lib/main-entrance/InitData.js +538 -0
- package/es2017/customerService/js-screen-shot/lib/main-entrance/PlugInParameters.d.ts +46 -0
- package/es2017/customerService/js-screen-shot/lib/main-entrance/PlugInParameters.js +162 -0
- package/es2017/customerService/js-screen-shot/lib/split-methods/AddHistoryData.d.ts +1 -0
- package/es2017/customerService/js-screen-shot/lib/split-methods/AddHistoryData.js +23 -0
- package/es2017/customerService/js-screen-shot/lib/split-methods/BoundaryJudgment.d.ts +8 -0
- package/es2017/customerService/js-screen-shot/lib/split-methods/BoundaryJudgment.js +13 -0
- package/es2017/customerService/js-screen-shot/lib/split-methods/CalculateOptionIcoPosition.d.ts +5 -0
- package/es2017/customerService/js-screen-shot/lib/split-methods/CalculateOptionIcoPosition.js +21 -0
- package/es2017/customerService/js-screen-shot/lib/split-methods/CalculateToolLocation.d.ts +16 -0
- package/es2017/customerService/js-screen-shot/lib/split-methods/CalculateToolLocation.js +39 -0
- package/es2017/customerService/js-screen-shot/lib/split-methods/DrawArrow.d.ts +31 -0
- package/es2017/customerService/js-screen-shot/lib/split-methods/DrawArrow.js +131 -0
- package/es2017/customerService/js-screen-shot/lib/split-methods/DrawCircle.d.ts +11 -0
- package/es2017/customerService/js-screen-shot/lib/split-methods/DrawCircle.js +37 -0
- package/es2017/customerService/js-screen-shot/lib/split-methods/DrawCutOutBox.d.ts +19 -0
- package/es2017/customerService/js-screen-shot/lib/split-methods/DrawCutOutBox.js +118 -0
- package/es2017/customerService/js-screen-shot/lib/split-methods/DrawLineArrow.d.ts +13 -0
- package/es2017/customerService/js-screen-shot/lib/split-methods/DrawLineArrow.js +51 -0
- package/es2017/customerService/js-screen-shot/lib/split-methods/DrawMasking.d.ts +6 -0
- package/es2017/customerService/js-screen-shot/lib/split-methods/DrawMasking.js +41 -0
- package/es2017/customerService/js-screen-shot/lib/split-methods/DrawMosaic.d.ts +12 -0
- package/es2017/customerService/js-screen-shot/lib/split-methods/DrawMosaic.js +67 -0
- package/es2017/customerService/js-screen-shot/lib/split-methods/DrawPencil.d.ts +13 -0
- package/es2017/customerService/js-screen-shot/lib/split-methods/DrawPencil.js +27 -0
- package/es2017/customerService/js-screen-shot/lib/split-methods/DrawRectangle.d.ts +11 -0
- package/es2017/customerService/js-screen-shot/lib/split-methods/DrawRectangle.js +22 -0
- package/es2017/customerService/js-screen-shot/lib/split-methods/DrawText.d.ts +10 -0
- package/es2017/customerService/js-screen-shot/lib/split-methods/DrawText.js +24 -0
- package/es2017/customerService/js-screen-shot/lib/split-methods/KeyboardEventHandle.d.ts +10 -0
- package/es2017/customerService/js-screen-shot/lib/split-methods/KeyboardEventHandle.js +50 -0
- package/es2017/customerService/js-screen-shot/lib/split-methods/SetPlugInParameters.d.ts +2 -0
- package/es2017/customerService/js-screen-shot/lib/split-methods/SetPlugInParameters.js +61 -0
- package/es2017/customerService/js-screen-shot/lib/split-methods/ToolClickEvent.d.ts +1 -0
- package/es2017/customerService/js-screen-shot/lib/split-methods/ToolClickEvent.js +132 -0
- package/es2017/customerService/js-screen-shot/lib/split-methods/drawCrossImg.d.ts +1 -0
- package/es2017/customerService/js-screen-shot/lib/split-methods/drawCrossImg.js +32 -0
- package/es2017/customerService/js-screen-shot/lib/type/ComponentType.d.ts +133 -0
- package/es2017/customerService/js-screen-shot/lib/type/ComponentType.js +2 -0
- package/es2017/customerService/js-screen-shot/main.d.ts +110 -0
- package/es2017/customerService/js-screen-shot/main.js +1098 -0
- package/esm/customerService/index.js +1 -1
- package/esm/customerService/js-screen-shot/assets/less/screen-shot.less +478 -0
- package/esm/customerService/js-screen-shot/lib/common-methods/CanvasPatch.d.ts +1 -0
- package/esm/customerService/js-screen-shot/lib/common-methods/CanvasPatch.js +15 -0
- package/esm/customerService/js-screen-shot/lib/common-methods/DeviceTypeVerif.d.ts +2 -0
- package/esm/customerService/js-screen-shot/lib/common-methods/DeviceTypeVerif.js +32 -0
- package/esm/customerService/js-screen-shot/lib/common-methods/FixedData.d.ts +11 -0
- package/esm/customerService/js-screen-shot/lib/common-methods/FixedData.js +17 -0
- package/esm/customerService/js-screen-shot/lib/common-methods/GetBrushSelectedName.d.ts +5 -0
- package/esm/customerService/js-screen-shot/lib/common-methods/GetBrushSelectedName.js +18 -0
- package/esm/customerService/js-screen-shot/lib/common-methods/GetCanvasImgData.d.ts +4 -0
- package/esm/customerService/js-screen-shot/lib/common-methods/GetCanvasImgData.js +25 -0
- package/esm/customerService/js-screen-shot/lib/common-methods/GetColor.d.ts +1 -0
- package/esm/customerService/js-screen-shot/lib/common-methods/GetColor.js +41 -0
- package/esm/customerService/js-screen-shot/lib/common-methods/GetSelectedCalssName.d.ts +1 -0
- package/esm/customerService/js-screen-shot/lib/common-methods/GetSelectedCalssName.js +23 -0
- package/esm/customerService/js-screen-shot/lib/common-methods/GetToolRelativePosition.d.ts +7 -0
- package/esm/customerService/js-screen-shot/lib/common-methods/GetToolRelativePosition.js +10 -0
- package/esm/customerService/js-screen-shot/lib/common-methods/ImgScaling.d.ts +11 -0
- package/esm/customerService/js-screen-shot/lib/common-methods/ImgScaling.js +38 -0
- package/esm/customerService/js-screen-shot/lib/common-methods/SaveBorderArrInfo.d.ts +8 -0
- package/esm/customerService/js-screen-shot/lib/common-methods/SaveBorderArrInfo.js +125 -0
- package/esm/customerService/js-screen-shot/lib/common-methods/SaveCanvasToBase64.d.ts +1 -0
- package/esm/customerService/js-screen-shot/lib/common-methods/SaveCanvasToBase64.js +37 -0
- package/esm/customerService/js-screen-shot/lib/common-methods/SaveCanvasToImage.d.ts +1 -0
- package/esm/customerService/js-screen-shot/lib/common-methods/SaveCanvasToImage.js +26 -0
- package/esm/customerService/js-screen-shot/lib/common-methods/SelectColor.d.ts +1 -0
- package/esm/customerService/js-screen-shot/lib/common-methods/SelectColor.js +6 -0
- package/esm/customerService/js-screen-shot/lib/common-methods/SelectTextSize.d.ts +5 -0
- package/esm/customerService/js-screen-shot/lib/common-methods/SelectTextSize.js +26 -0
- package/esm/customerService/js-screen-shot/lib/common-methods/SetBrushSize.d.ts +14 -0
- package/esm/customerService/js-screen-shot/lib/common-methods/SetBrushSize.js +50 -0
- package/esm/customerService/js-screen-shot/lib/common-methods/SetSelectedClassName.d.ts +7 -0
- package/esm/customerService/js-screen-shot/lib/common-methods/SetSelectedClassName.js +28 -0
- package/esm/customerService/js-screen-shot/lib/common-methods/TakeOutHistory.d.ts +1 -0
- package/esm/customerService/js-screen-shot/lib/common-methods/TakeOutHistory.js +20 -0
- package/esm/customerService/js-screen-shot/lib/common-methods/UpdateContainerMouseStyle.d.ts +1 -0
- package/esm/customerService/js-screen-shot/lib/common-methods/UpdateContainerMouseStyle.js +10 -0
- package/esm/customerService/js-screen-shot/lib/common-methods/ZoomCutOutBoxPosition.d.ts +17 -0
- package/esm/customerService/js-screen-shot/lib/common-methods/ZoomCutOutBoxPosition.js +92 -0
- package/esm/customerService/js-screen-shot/lib/config/Toolbar.d.ts +5 -0
- package/esm/customerService/js-screen-shot/lib/config/Toolbar.js +46 -0
- package/esm/customerService/js-screen-shot/lib/main-entrance/CreateDom.d.ts +24 -0
- package/esm/customerService/js-screen-shot/lib/main-entrance/CreateDom.js +345 -0
- package/esm/customerService/js-screen-shot/lib/main-entrance/InitData.d.ts +78 -0
- package/esm/customerService/js-screen-shot/lib/main-entrance/InitData.js +758 -0
- package/esm/customerService/js-screen-shot/lib/main-entrance/PlugInParameters.d.ts +46 -0
- package/esm/customerService/js-screen-shot/lib/main-entrance/PlugInParameters.js +259 -0
- package/esm/customerService/js-screen-shot/lib/split-methods/AddHistoryData.d.ts +1 -0
- package/esm/customerService/js-screen-shot/lib/split-methods/AddHistoryData.js +23 -0
- package/esm/customerService/js-screen-shot/lib/split-methods/BoundaryJudgment.d.ts +8 -0
- package/esm/customerService/js-screen-shot/lib/split-methods/BoundaryJudgment.js +13 -0
- package/esm/customerService/js-screen-shot/lib/split-methods/CalculateOptionIcoPosition.d.ts +5 -0
- package/esm/customerService/js-screen-shot/lib/split-methods/CalculateOptionIcoPosition.js +21 -0
- package/esm/customerService/js-screen-shot/lib/split-methods/CalculateToolLocation.d.ts +16 -0
- package/esm/customerService/js-screen-shot/lib/split-methods/CalculateToolLocation.js +39 -0
- package/esm/customerService/js-screen-shot/lib/split-methods/DrawArrow.d.ts +31 -0
- package/esm/customerService/js-screen-shot/lib/split-methods/DrawArrow.js +159 -0
- package/esm/customerService/js-screen-shot/lib/split-methods/DrawCircle.d.ts +11 -0
- package/esm/customerService/js-screen-shot/lib/split-methods/DrawCircle.js +37 -0
- package/esm/customerService/js-screen-shot/lib/split-methods/DrawCutOutBox.d.ts +19 -0
- package/esm/customerService/js-screen-shot/lib/split-methods/DrawCutOutBox.js +119 -0
- package/esm/customerService/js-screen-shot/lib/split-methods/DrawLineArrow.d.ts +13 -0
- package/esm/customerService/js-screen-shot/lib/split-methods/DrawLineArrow.js +51 -0
- package/esm/customerService/js-screen-shot/lib/split-methods/DrawMasking.d.ts +6 -0
- package/esm/customerService/js-screen-shot/lib/split-methods/DrawMasking.js +41 -0
- package/esm/customerService/js-screen-shot/lib/split-methods/DrawMosaic.d.ts +12 -0
- package/esm/customerService/js-screen-shot/lib/split-methods/DrawMosaic.js +67 -0
- package/esm/customerService/js-screen-shot/lib/split-methods/DrawPencil.d.ts +13 -0
- package/esm/customerService/js-screen-shot/lib/split-methods/DrawPencil.js +27 -0
- package/esm/customerService/js-screen-shot/lib/split-methods/DrawRectangle.d.ts +11 -0
- package/esm/customerService/js-screen-shot/lib/split-methods/DrawRectangle.js +22 -0
- package/esm/customerService/js-screen-shot/lib/split-methods/DrawText.d.ts +10 -0
- package/esm/customerService/js-screen-shot/lib/split-methods/DrawText.js +24 -0
- package/esm/customerService/js-screen-shot/lib/split-methods/KeyboardEventHandle.d.ts +10 -0
- package/esm/customerService/js-screen-shot/lib/split-methods/KeyboardEventHandle.js +61 -0
- package/esm/customerService/js-screen-shot/lib/split-methods/SetPlugInParameters.d.ts +2 -0
- package/esm/customerService/js-screen-shot/lib/split-methods/SetPlugInParameters.js +62 -0
- package/esm/customerService/js-screen-shot/lib/split-methods/ToolClickEvent.d.ts +1 -0
- package/esm/customerService/js-screen-shot/lib/split-methods/ToolClickEvent.js +132 -0
- package/esm/customerService/js-screen-shot/lib/split-methods/drawCrossImg.d.ts +1 -0
- package/esm/customerService/js-screen-shot/lib/split-methods/drawCrossImg.js +32 -0
- package/esm/customerService/js-screen-shot/lib/type/ComponentType.d.ts +133 -0
- package/esm/customerService/js-screen-shot/lib/type/ComponentType.js +2 -0
- package/esm/customerService/js-screen-shot/main.d.ts +110 -0
- package/esm/customerService/js-screen-shot/main.js +1201 -0
- package/package.json +1 -1
- package/dist/a4d5ce04.esm.es5.production.js +0 -468
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { nonNegativeData } from "./FixedData";
|
|
2
|
+
/**
|
|
3
|
+
* 缩放裁剪框
|
|
4
|
+
* @param currentX 当前鼠标X轴坐标
|
|
5
|
+
* @param currentY 当前鼠标Y轴坐标
|
|
6
|
+
* @param startX 裁剪框当前X轴坐标
|
|
7
|
+
* @param startY 裁剪框当前Y轴坐标
|
|
8
|
+
* @param width 裁剪框宽度
|
|
9
|
+
* @param height 裁剪框高度
|
|
10
|
+
* @param option 当前操作的节点
|
|
11
|
+
* @private
|
|
12
|
+
*/ export function zoomCutOutBoxPosition(currentX, currentY, startX, startY, width, height, option) {
|
|
13
|
+
// 临时坐标
|
|
14
|
+
var tempStartX, tempStartY, tempWidth, tempHeight = 0;
|
|
15
|
+
// 判断操作方向
|
|
16
|
+
switch(option){
|
|
17
|
+
case 2:
|
|
18
|
+
tempStartY = currentY - (startY + height) > 0 ? startY + height : currentY;
|
|
19
|
+
tempHeight = nonNegativeData(height - (currentY - startY));
|
|
20
|
+
return {
|
|
21
|
+
tempStartX: startX,
|
|
22
|
+
tempStartY: tempStartY,
|
|
23
|
+
tempWidth: width,
|
|
24
|
+
tempHeight: tempHeight
|
|
25
|
+
};
|
|
26
|
+
case 3:
|
|
27
|
+
tempHeight = nonNegativeData(currentY - startY);
|
|
28
|
+
return {
|
|
29
|
+
tempStartX: startX,
|
|
30
|
+
tempStartY: startY,
|
|
31
|
+
tempWidth: width,
|
|
32
|
+
tempHeight: tempHeight
|
|
33
|
+
};
|
|
34
|
+
case 4:
|
|
35
|
+
tempStartX = currentX - (startX + width) > 0 ? startX + width : currentX;
|
|
36
|
+
tempWidth = nonNegativeData(width - (currentX - startX));
|
|
37
|
+
return {
|
|
38
|
+
tempStartX: tempStartX,
|
|
39
|
+
tempStartY: startY,
|
|
40
|
+
tempWidth: tempWidth,
|
|
41
|
+
tempHeight: height
|
|
42
|
+
};
|
|
43
|
+
case 5:
|
|
44
|
+
tempWidth = nonNegativeData(currentX - startX);
|
|
45
|
+
return {
|
|
46
|
+
tempStartX: startX,
|
|
47
|
+
tempStartY: startY,
|
|
48
|
+
tempWidth: tempWidth,
|
|
49
|
+
tempHeight: height
|
|
50
|
+
};
|
|
51
|
+
case 6:
|
|
52
|
+
tempStartX = currentX - (startX + width) > 0 ? startX + width : currentX;
|
|
53
|
+
tempStartY = currentY - (startY + height) > 0 ? startY + height : currentY;
|
|
54
|
+
tempWidth = nonNegativeData(width - (currentX - startX));
|
|
55
|
+
tempHeight = nonNegativeData(height - (currentY - startY));
|
|
56
|
+
return {
|
|
57
|
+
tempStartX: tempStartX,
|
|
58
|
+
tempStartY: tempStartY,
|
|
59
|
+
tempWidth: tempWidth,
|
|
60
|
+
tempHeight: tempHeight
|
|
61
|
+
};
|
|
62
|
+
case 7:
|
|
63
|
+
tempWidth = nonNegativeData(currentX - startX);
|
|
64
|
+
tempHeight = nonNegativeData(currentY - startY);
|
|
65
|
+
return {
|
|
66
|
+
tempStartX: startX,
|
|
67
|
+
tempStartY: startY,
|
|
68
|
+
tempWidth: tempWidth,
|
|
69
|
+
tempHeight: tempHeight
|
|
70
|
+
};
|
|
71
|
+
case 8:
|
|
72
|
+
tempStartY = currentY - (startY + height) > 0 ? startY + height : currentY;
|
|
73
|
+
tempWidth = nonNegativeData(currentX - startX);
|
|
74
|
+
tempHeight = nonNegativeData(height - (currentY - startY));
|
|
75
|
+
return {
|
|
76
|
+
tempStartX: startX,
|
|
77
|
+
tempStartY: tempStartY,
|
|
78
|
+
tempWidth: tempWidth,
|
|
79
|
+
tempHeight: tempHeight
|
|
80
|
+
};
|
|
81
|
+
case 9:
|
|
82
|
+
tempStartX = currentX - (startX + width) > 0 ? startX + width : currentX;
|
|
83
|
+
tempWidth = nonNegativeData(width - (currentX - startX));
|
|
84
|
+
tempHeight = nonNegativeData(currentY - startY);
|
|
85
|
+
return {
|
|
86
|
+
tempStartX: tempStartX,
|
|
87
|
+
tempStartY: startY,
|
|
88
|
+
tempWidth: tempWidth,
|
|
89
|
+
tempHeight: tempHeight
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export default [
|
|
2
|
+
{
|
|
3
|
+
id: 1,
|
|
4
|
+
title: "square"
|
|
5
|
+
},
|
|
6
|
+
{
|
|
7
|
+
id: 2,
|
|
8
|
+
title: "round"
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
id: 3,
|
|
12
|
+
title: "right-top"
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
id: 4,
|
|
16
|
+
title: "brush"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
id: 5,
|
|
20
|
+
title: "mosaicPen"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
id: 6,
|
|
24
|
+
title: "text"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
id: 7,
|
|
28
|
+
title: "separateLine"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
id: 8,
|
|
32
|
+
title: "save"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
id: 9,
|
|
36
|
+
title: "undo"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
id: 10,
|
|
40
|
+
title: "close"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
id: 11,
|
|
44
|
+
title: "confirm"
|
|
45
|
+
}
|
|
46
|
+
];
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { screenShotType } from "../type/ComponentType";
|
|
2
|
+
export default class CreateDom {
|
|
3
|
+
private readonly screenShotController;
|
|
4
|
+
private readonly toolController;
|
|
5
|
+
private readonly optionIcoController;
|
|
6
|
+
private readonly optionController;
|
|
7
|
+
private readonly textInputController;
|
|
8
|
+
private readonly completeCallback;
|
|
9
|
+
private readonly closeCallback;
|
|
10
|
+
private readonly hiddenIcoArr;
|
|
11
|
+
private readonly toolbar;
|
|
12
|
+
private readonly textFontSizeList;
|
|
13
|
+
constructor(options: screenShotType);
|
|
14
|
+
private setToolBarIco;
|
|
15
|
+
private setTextSizeSelectPanel;
|
|
16
|
+
private setBrushSelectPanel;
|
|
17
|
+
private setTextInputPanel;
|
|
18
|
+
private setAllControllerId;
|
|
19
|
+
private hiddenAllDom;
|
|
20
|
+
private setDomToBody;
|
|
21
|
+
private clearBody;
|
|
22
|
+
private setOptionIcoClassName;
|
|
23
|
+
private filterHideIcon;
|
|
24
|
+
}
|
|
@@ -0,0 +1,345 @@
|
|
|
1
|
+
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
|
|
2
|
+
import { _ as _create_class } from "@swc/helpers/_/_create_class";
|
|
3
|
+
import { _ as _define_property } from "@swc/helpers/_/_define_property";
|
|
4
|
+
import toolbar from "../config/Toolbar";
|
|
5
|
+
import { toolClickEvent } from "../split-methods/ToolClickEvent";
|
|
6
|
+
import { setBrushSize, setMosaicPenSize } from "../common-methods/SetBrushSize";
|
|
7
|
+
import { selectColor } from "../common-methods/SelectColor";
|
|
8
|
+
import { getColor } from "../common-methods/GetColor";
|
|
9
|
+
import { getTextSize, hiddenColorPanelStatus, hiddenTextSizeOptionStatus, selectTextSize, setTextSize } from "../common-methods/SelectTextSize";
|
|
10
|
+
var CreateDom = /*#__PURE__*/ function() {
|
|
11
|
+
"use strict";
|
|
12
|
+
function CreateDom(options) {
|
|
13
|
+
_class_call_check(this, CreateDom);
|
|
14
|
+
// 截图区域canvas容器
|
|
15
|
+
_define_property(this, "screenShotController", void 0);
|
|
16
|
+
// 截图工具栏容器
|
|
17
|
+
_define_property(this, "toolController", void 0);
|
|
18
|
+
// 绘制选项顶部ico容器
|
|
19
|
+
_define_property(this, "optionIcoController", void 0);
|
|
20
|
+
// 画笔绘制选项容器
|
|
21
|
+
_define_property(this, "optionController", void 0);
|
|
22
|
+
// 裁剪框大小显示容器
|
|
23
|
+
// private readonly cutBoxSizeContainer: HTMLDivElement;
|
|
24
|
+
// 文字工具输入容器
|
|
25
|
+
_define_property(this, "textInputController", void 0);
|
|
26
|
+
// 截图完成回调函数
|
|
27
|
+
_define_property(this, "completeCallback", void 0);
|
|
28
|
+
// 截图关闭毁掉函数
|
|
29
|
+
_define_property(this, "closeCallback", void 0);
|
|
30
|
+
// 需要隐藏的图标
|
|
31
|
+
_define_property(this, "hiddenIcoArr", void 0);
|
|
32
|
+
// 截图工具栏图标
|
|
33
|
+
_define_property(this, "toolbar", void 0);
|
|
34
|
+
_define_property(this, "textFontSizeList", [
|
|
35
|
+
12,
|
|
36
|
+
13,
|
|
37
|
+
14,
|
|
38
|
+
15,
|
|
39
|
+
16,
|
|
40
|
+
17,
|
|
41
|
+
20,
|
|
42
|
+
24,
|
|
43
|
+
36,
|
|
44
|
+
48,
|
|
45
|
+
64,
|
|
46
|
+
72,
|
|
47
|
+
96
|
|
48
|
+
]);
|
|
49
|
+
this.screenShotController = document.createElement("canvas");
|
|
50
|
+
this.toolController = document.createElement("div");
|
|
51
|
+
this.optionIcoController = document.createElement("div");
|
|
52
|
+
this.optionController = document.createElement("div");
|
|
53
|
+
// this.cutBoxSizeContainer = document.createElement("div");
|
|
54
|
+
this.textInputController = document.createElement("div");
|
|
55
|
+
this.completeCallback = options === null || options === void 0 ? void 0 : options.completeCallback;
|
|
56
|
+
this.closeCallback = options === null || options === void 0 ? void 0 : options.closeCallback;
|
|
57
|
+
this.hiddenIcoArr = [];
|
|
58
|
+
this.optionController.addEventListener("click", function(evt) {
|
|
59
|
+
var target = evt.target;
|
|
60
|
+
if (target.id === "colorSelectPanel" || target.id === "textSizePanel") {
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
// 点击工具栏的其他位置则隐藏文字大小选择面板与颜色选择面板
|
|
64
|
+
hiddenTextSizeOptionStatus();
|
|
65
|
+
hiddenColorPanelStatus();
|
|
66
|
+
});
|
|
67
|
+
// 成功回调函数不存在则设置一个默认的
|
|
68
|
+
if (!options || !Object.prototype.hasOwnProperty.call(options, "completeCallback")) {
|
|
69
|
+
this.completeCallback = function(imgInfo) {
|
|
70
|
+
sessionStorage.setItem("screenShotImg", JSON.stringify(imgInfo));
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
// 筛选需要隐藏的图标
|
|
74
|
+
if (options === null || options === void 0 ? void 0 : options.hiddenToolIco) {
|
|
75
|
+
for(var iconKey in options.hiddenToolIco){
|
|
76
|
+
if (options.hiddenToolIco[iconKey]) {
|
|
77
|
+
this.filterHideIcon(iconKey);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
// 为所有dom设置id
|
|
82
|
+
this.setAllControllerId();
|
|
83
|
+
// 为画笔绘制选项角标设置class
|
|
84
|
+
this.setOptionIcoClassName();
|
|
85
|
+
this.toolbar = toolbar;
|
|
86
|
+
// 渲染工具栏
|
|
87
|
+
this.setToolBarIco();
|
|
88
|
+
// 渲染文字大小选择容器
|
|
89
|
+
this.setTextSizeSelectPanel();
|
|
90
|
+
// 渲染画笔相关选项
|
|
91
|
+
this.setBrushSelectPanel();
|
|
92
|
+
// 渲染文本输入
|
|
93
|
+
this.setTextInputPanel();
|
|
94
|
+
// 渲染页面
|
|
95
|
+
this.setDomToBody();
|
|
96
|
+
// 隐藏所有dom
|
|
97
|
+
this.hiddenAllDom();
|
|
98
|
+
}
|
|
99
|
+
_create_class(CreateDom, [
|
|
100
|
+
{
|
|
101
|
+
key: "setToolBarIco",
|
|
102
|
+
value: // 渲染截图工具栏图标
|
|
103
|
+
function setToolBarIco() {
|
|
104
|
+
var _this = this, _loop = function(i) {
|
|
105
|
+
var item = _this.toolbar[i];
|
|
106
|
+
// 判断是否有需要隐藏的图标
|
|
107
|
+
var icoHiddenStatus = false;
|
|
108
|
+
for(var j = 0; j < _this.hiddenIcoArr.length; j++){
|
|
109
|
+
if (_this.hiddenIcoArr[j] === item.title) {
|
|
110
|
+
icoHiddenStatus = true;
|
|
111
|
+
break;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
// 图标隐藏状态为true则直接跳过本次循环
|
|
115
|
+
if (icoHiddenStatus) return "continue";
|
|
116
|
+
var itemPanel = document.createElement("div");
|
|
117
|
+
// 撤销按钮单独处理
|
|
118
|
+
if (item.title == "undo") {
|
|
119
|
+
itemPanel.className = "item-panel undo-disabled";
|
|
120
|
+
itemPanel.id = "undoPanel";
|
|
121
|
+
} else {
|
|
122
|
+
itemPanel.className = "item-panel ".concat(item.title);
|
|
123
|
+
itemPanel.addEventListener("click", function(e) {
|
|
124
|
+
toolClickEvent(item.title, item.id, e, _this1.completeCallback, _this1.closeCallback);
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
itemPanel.setAttribute("data-title", item.title);
|
|
128
|
+
itemPanel.setAttribute("data-id", item.id + "");
|
|
129
|
+
_this.toolController.appendChild(itemPanel);
|
|
130
|
+
};
|
|
131
|
+
var _this1 = this;
|
|
132
|
+
for(var i = 0; i < this.toolbar.length; i++)_loop(i);
|
|
133
|
+
// 有需要隐藏的截图工具栏时,则修改其最小宽度
|
|
134
|
+
if (this.hiddenIcoArr.length > 0) {
|
|
135
|
+
this.toolController.style.minWidth = "24px";
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
key: "setTextSizeSelectPanel",
|
|
141
|
+
value: // 渲染文字大小选择容器
|
|
142
|
+
function setTextSizeSelectPanel() {
|
|
143
|
+
var _this = this, _loop = function(i) {
|
|
144
|
+
var itemPanel = document.createElement("div");
|
|
145
|
+
var size = _this.textFontSizeList[i];
|
|
146
|
+
itemPanel.className = "text-item";
|
|
147
|
+
itemPanel.setAttribute("data-value", "".concat(size));
|
|
148
|
+
itemPanel.innerText = "".concat(size, " px");
|
|
149
|
+
// 添加点击监听
|
|
150
|
+
itemPanel.addEventListener("click", function() {
|
|
151
|
+
// 隐藏容器
|
|
152
|
+
textSelectPanel.style.display = "none";
|
|
153
|
+
var currentTextSize = itemPanel.getAttribute("data-value");
|
|
154
|
+
// 容器赋值
|
|
155
|
+
textSizePanel.innerText = "".concat(currentTextSize, " px");
|
|
156
|
+
if (currentTextSize) {
|
|
157
|
+
setTextSize(+currentTextSize);
|
|
158
|
+
}
|
|
159
|
+
});
|
|
160
|
+
textSelectPanel.appendChild(itemPanel);
|
|
161
|
+
};
|
|
162
|
+
// 创建文字展示容器
|
|
163
|
+
var textSizePanel = document.createElement("div");
|
|
164
|
+
textSizePanel.className = "text-size-panel";
|
|
165
|
+
textSizePanel.innerText = "".concat(getTextSize(), " px");
|
|
166
|
+
textSizePanel.id = "textSizePanel";
|
|
167
|
+
// 创建文字大小选择容器
|
|
168
|
+
var textSelectPanel = document.createElement("div");
|
|
169
|
+
textSelectPanel.className = "text-select-panel";
|
|
170
|
+
textSelectPanel.id = "textSelectPanel";
|
|
171
|
+
// 创建文字选择下拉
|
|
172
|
+
for(var i = 0; i < this.textFontSizeList.length; i++)_loop(i);
|
|
173
|
+
textSizePanel.style.display = "none";
|
|
174
|
+
textSelectPanel.style.display = "none";
|
|
175
|
+
// 容器点击时,展示文字大小选择容器
|
|
176
|
+
textSizePanel.addEventListener("click", function() {
|
|
177
|
+
selectTextSize();
|
|
178
|
+
});
|
|
179
|
+
this.optionController.appendChild(textSizePanel);
|
|
180
|
+
this.optionController.appendChild(textSelectPanel);
|
|
181
|
+
}
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
key: "setBrushSelectPanel",
|
|
185
|
+
value: // 渲染画笔大小选择图标与颜色选择容器
|
|
186
|
+
function setBrushSelectPanel() {
|
|
187
|
+
var _loop = function(i1) {
|
|
188
|
+
var colorItem = document.createElement("div");
|
|
189
|
+
colorItem.className = "color-item";
|
|
190
|
+
colorItem.addEventListener("click", function() {
|
|
191
|
+
getColor(i1 + 1);
|
|
192
|
+
});
|
|
193
|
+
colorItem.setAttribute("data-index", i1 + "");
|
|
194
|
+
colorPanel.appendChild(colorItem);
|
|
195
|
+
};
|
|
196
|
+
// 创建画笔选择容器
|
|
197
|
+
var brushSelectPanel = document.createElement("div");
|
|
198
|
+
brushSelectPanel.id = "brushSelectPanel";
|
|
199
|
+
brushSelectPanel.className = "brush-select-panel";
|
|
200
|
+
for(var i = 0; i < 3; i++){
|
|
201
|
+
// 创建画笔图标容器
|
|
202
|
+
var itemPanel = document.createElement("div");
|
|
203
|
+
itemPanel.className = "item-panel";
|
|
204
|
+
switch(i){
|
|
205
|
+
case 0:
|
|
206
|
+
itemPanel.classList.add("brush-small");
|
|
207
|
+
itemPanel.classList.add("brush-small-active");
|
|
208
|
+
itemPanel.addEventListener("click", function(e) {
|
|
209
|
+
setBrushSize("small", 1, e);
|
|
210
|
+
setMosaicPenSize("small", 1, e);
|
|
211
|
+
});
|
|
212
|
+
break;
|
|
213
|
+
case 1:
|
|
214
|
+
itemPanel.classList.add("brush-medium");
|
|
215
|
+
itemPanel.addEventListener("click", function(e) {
|
|
216
|
+
setBrushSize("medium", 2, e);
|
|
217
|
+
setMosaicPenSize("medium", 2, e);
|
|
218
|
+
});
|
|
219
|
+
break;
|
|
220
|
+
case 2:
|
|
221
|
+
itemPanel.classList.add("brush-big");
|
|
222
|
+
itemPanel.addEventListener("click", function(e) {
|
|
223
|
+
setBrushSize("big", 3, e);
|
|
224
|
+
setMosaicPenSize("big", 3, e);
|
|
225
|
+
});
|
|
226
|
+
break;
|
|
227
|
+
}
|
|
228
|
+
brushSelectPanel.appendChild(itemPanel);
|
|
229
|
+
}
|
|
230
|
+
// 右侧颜色选择容器
|
|
231
|
+
var rightPanel = document.createElement("div");
|
|
232
|
+
rightPanel.className = "right-panel";
|
|
233
|
+
// 创建颜色选择容器
|
|
234
|
+
var colorSelectPanel = document.createElement("div");
|
|
235
|
+
colorSelectPanel.className = "color-select-panel";
|
|
236
|
+
colorSelectPanel.id = "colorSelectPanel";
|
|
237
|
+
colorSelectPanel.addEventListener("click", function() {
|
|
238
|
+
selectColor();
|
|
239
|
+
});
|
|
240
|
+
// 创建颜色显示容器
|
|
241
|
+
var colorPanel = document.createElement("div");
|
|
242
|
+
colorPanel.id = "colorPanel";
|
|
243
|
+
colorPanel.className = "color-panel";
|
|
244
|
+
colorPanel.style.display = "none";
|
|
245
|
+
for(var i1 = 0; i1 < 10; i1++)_loop(i1);
|
|
246
|
+
rightPanel.appendChild(colorPanel);
|
|
247
|
+
rightPanel.appendChild(colorSelectPanel);
|
|
248
|
+
rightPanel.id = "rightPanel";
|
|
249
|
+
// 创建颜色下拉箭头选择容器
|
|
250
|
+
var pullDownArrow = document.createElement("div");
|
|
251
|
+
pullDownArrow.className = "pull-down-arrow";
|
|
252
|
+
pullDownArrow.addEventListener("click", function() {
|
|
253
|
+
selectColor();
|
|
254
|
+
});
|
|
255
|
+
rightPanel.appendChild(pullDownArrow);
|
|
256
|
+
// 向画笔绘制选项容器追加画笔选择和颜色显示容器
|
|
257
|
+
this.optionController.appendChild(brushSelectPanel);
|
|
258
|
+
this.optionController.appendChild(rightPanel);
|
|
259
|
+
}
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
key: "setTextInputPanel",
|
|
263
|
+
value: // 渲染文本输入区域容器
|
|
264
|
+
function setTextInputPanel() {
|
|
265
|
+
// 让div可编辑
|
|
266
|
+
this.textInputController.contentEditable = "true";
|
|
267
|
+
// 关闭拼写检查
|
|
268
|
+
this.textInputController.spellcheck = false;
|
|
269
|
+
}
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
key: "setAllControllerId",
|
|
273
|
+
value: // 为所有Dom设置id
|
|
274
|
+
function setAllControllerId() {
|
|
275
|
+
this.screenShotController.id = "screenShotContainer";
|
|
276
|
+
this.toolController.id = "toolPanel";
|
|
277
|
+
this.optionIcoController.id = "optionIcoController";
|
|
278
|
+
this.optionController.id = "optionPanel";
|
|
279
|
+
// this.cutBoxSizeContainer.id = "cutBoxSizePanel";
|
|
280
|
+
this.textInputController.id = "textInputPanel";
|
|
281
|
+
}
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
key: "hiddenAllDom",
|
|
285
|
+
value: // 隐藏所有dom
|
|
286
|
+
function hiddenAllDom() {
|
|
287
|
+
this.screenShotController.style.display = "none";
|
|
288
|
+
this.toolController.style.display = "none";
|
|
289
|
+
this.optionIcoController.style.display = "none";
|
|
290
|
+
this.optionController.style.display = "none";
|
|
291
|
+
// this.cutBoxSizeContainer.style.display = "none";
|
|
292
|
+
this.textInputController.style.display = "none";
|
|
293
|
+
}
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
key: "setDomToBody",
|
|
297
|
+
value: // 将截图相关dom渲染至body
|
|
298
|
+
function setDomToBody() {
|
|
299
|
+
this.clearBody();
|
|
300
|
+
document.body.appendChild(this.screenShotController);
|
|
301
|
+
document.body.appendChild(this.toolController);
|
|
302
|
+
document.body.appendChild(this.optionIcoController);
|
|
303
|
+
document.body.appendChild(this.optionController);
|
|
304
|
+
// document.body.appendChild(this.cutBoxSizeContainer);
|
|
305
|
+
document.body.appendChild(this.textInputController);
|
|
306
|
+
}
|
|
307
|
+
},
|
|
308
|
+
{
|
|
309
|
+
key: "clearBody",
|
|
310
|
+
value: // 清除截图相关dom
|
|
311
|
+
function clearBody() {
|
|
312
|
+
var _document_getElementById, _document_getElementById1, _document_getElementById2, _document_getElementById3, // document.getElementById("cutBoxSizePanel")?.remove();
|
|
313
|
+
_document_getElementById4;
|
|
314
|
+
(_document_getElementById = document.getElementById("screenShotContainer")) === null || _document_getElementById === void 0 ? void 0 : _document_getElementById.remove();
|
|
315
|
+
(_document_getElementById1 = document.getElementById("toolPanel")) === null || _document_getElementById1 === void 0 ? void 0 : _document_getElementById1.remove();
|
|
316
|
+
(_document_getElementById2 = document.getElementById("optionIcoController")) === null || _document_getElementById2 === void 0 ? void 0 : _document_getElementById2.remove();
|
|
317
|
+
(_document_getElementById3 = document.getElementById("optionPanel")) === null || _document_getElementById3 === void 0 ? void 0 : _document_getElementById3.remove();
|
|
318
|
+
(_document_getElementById4 = document.getElementById("textInputPanel")) === null || _document_getElementById4 === void 0 ? void 0 : _document_getElementById4.remove();
|
|
319
|
+
}
|
|
320
|
+
},
|
|
321
|
+
{
|
|
322
|
+
key: "setOptionIcoClassName",
|
|
323
|
+
value: // 设置画笔绘制选项顶部ico样式
|
|
324
|
+
function setOptionIcoClassName() {
|
|
325
|
+
this.optionIcoController.className = "ico-panel";
|
|
326
|
+
}
|
|
327
|
+
},
|
|
328
|
+
{
|
|
329
|
+
key: "filterHideIcon",
|
|
330
|
+
value: // 将需要隐藏的图标放入对应的数组中
|
|
331
|
+
function filterHideIcon(icons) {
|
|
332
|
+
switch(icons){
|
|
333
|
+
case "rightTop":
|
|
334
|
+
this.hiddenIcoArr.push("right-top");
|
|
335
|
+
break;
|
|
336
|
+
default:
|
|
337
|
+
this.hiddenIcoArr.push(icons);
|
|
338
|
+
break;
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
]);
|
|
343
|
+
return CreateDom;
|
|
344
|
+
}();
|
|
345
|
+
export { CreateDom as default };
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { positionInfoType, textInfoType } from "../type/ComponentType";
|
|
2
|
+
export default class InitData {
|
|
3
|
+
constructor();
|
|
4
|
+
setInitStatus(status: boolean): void;
|
|
5
|
+
setScreenShotInfo(width: number, height: number): void;
|
|
6
|
+
setScreenShotPosition(left: number, top: number): void;
|
|
7
|
+
showScreenShotPanel(): void;
|
|
8
|
+
getScreenShotContainer(): HTMLCanvasElement;
|
|
9
|
+
getToolController(): HTMLDivElement;
|
|
10
|
+
getTextInputController(): HTMLDivElement;
|
|
11
|
+
getTextStatus(): boolean;
|
|
12
|
+
getScreenShotImageController(): HTMLCanvasElement;
|
|
13
|
+
setScreenShotImageController(imageController: HTMLCanvasElement): void;
|
|
14
|
+
setToolStatus(status: boolean): void;
|
|
15
|
+
setTextEditState(state: boolean): void;
|
|
16
|
+
getTextEditState(): boolean;
|
|
17
|
+
setTextStatus(status: boolean): void;
|
|
18
|
+
setToolInfo(left: number, top: number): void;
|
|
19
|
+
getToolClickStatus(): boolean;
|
|
20
|
+
setToolClickStatus(status: boolean): void;
|
|
21
|
+
setResetScrollbarState(state: boolean): void;
|
|
22
|
+
getResetScrollbarState(): boolean;
|
|
23
|
+
getCutOutBoxPosition(): positionInfoType;
|
|
24
|
+
getDragging(): boolean;
|
|
25
|
+
setDragging(status: boolean): void;
|
|
26
|
+
getDraggingTrim(): boolean;
|
|
27
|
+
getToolPositionStatus(): boolean;
|
|
28
|
+
setToolPositionStatus(status: boolean): void;
|
|
29
|
+
setDraggingTrim(status: boolean): void;
|
|
30
|
+
setCutOutBoxPosition(mouseX: number, mouseY: number, width: number, height: number): void;
|
|
31
|
+
setFontSize(size: number): void;
|
|
32
|
+
setOptionStatus(status: boolean): void;
|
|
33
|
+
getFontSize(): number;
|
|
34
|
+
setTextSizeOptionStatus(status: boolean): void;
|
|
35
|
+
setTextSizePanelStatus(status: boolean): void;
|
|
36
|
+
setBrushSelectionStatus(status: boolean): void;
|
|
37
|
+
hiddenOptionIcoStatus(): void;
|
|
38
|
+
getOptionIcoController(): HTMLDivElement;
|
|
39
|
+
getTextSizeContainer(): HTMLDivElement;
|
|
40
|
+
getOptionTextSizeController(): HTMLDivElement;
|
|
41
|
+
getBrushSelectionController(): HTMLDivElement;
|
|
42
|
+
getOptionController(): HTMLDivElement;
|
|
43
|
+
setOptionPosition(position: number): void;
|
|
44
|
+
getToolPosition(): {
|
|
45
|
+
left: number;
|
|
46
|
+
top: number;
|
|
47
|
+
};
|
|
48
|
+
getSelectedColor(): string;
|
|
49
|
+
setSelectedColor(color: string): void;
|
|
50
|
+
getColorSelectPanel(): HTMLElement;
|
|
51
|
+
getToolName(): string;
|
|
52
|
+
setToolName(itemName: string): void;
|
|
53
|
+
getPenSize(): number;
|
|
54
|
+
setPenSize(size: number): void;
|
|
55
|
+
getMosaicPenSize(): number;
|
|
56
|
+
setMosaicPenSize(size: number): void;
|
|
57
|
+
getBorderSize(): number;
|
|
58
|
+
getHistory(): Record<string, any>[];
|
|
59
|
+
shiftHistory(): Record<string, any>;
|
|
60
|
+
popHistory(): Record<string, any>;
|
|
61
|
+
pushHistory(item: Record<string, any>): void;
|
|
62
|
+
getUndoClickNum(): number;
|
|
63
|
+
setUndoClickNum(clickNumber: number): void;
|
|
64
|
+
getColorPanel(): HTMLElement;
|
|
65
|
+
setColorPanelStatus(status: boolean): void;
|
|
66
|
+
getNoScrollStatus(): boolean;
|
|
67
|
+
setNoScrollStatus(status?: boolean): void;
|
|
68
|
+
setActiveToolName(toolName: string): void;
|
|
69
|
+
getActiveToolName(): string;
|
|
70
|
+
setTextInfo(info: textInfoType): void;
|
|
71
|
+
getTextInfo(): textInfoType;
|
|
72
|
+
getRightPanel(): HTMLElement;
|
|
73
|
+
setRightPanel(status: boolean): void;
|
|
74
|
+
setUndoStatus(status: boolean): void;
|
|
75
|
+
cancelEvent(): void;
|
|
76
|
+
getUndoController(): HTMLElement;
|
|
77
|
+
destroyDOM(): void;
|
|
78
|
+
}
|