@labelbee/lb-annotation 1.14.0-alpha.2 → 1.14.0-alpha.3
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/_virtual/MathUtilsWorker.js +8 -1
- package/dist/_virtual/_rollup-plugin-web-worker-loader__helper__browser__createBase64WorkerFactory.js +35 -2
- package/dist/_virtual/filterBoxWorker.js +8 -1
- package/dist/_virtual/highlightWorker.js +8 -1
- package/dist/assets/attributeIcon/icon_canvasEdit0.svg.js +5 -1
- package/dist/assets/attributeIcon/icon_canvasEdit1.svg.js +5 -1
- package/dist/assets/attributeIcon/icon_canvasEdit2.svg.js +5 -1
- package/dist/assets/attributeIcon/icon_canvasEdit3.svg.js +5 -1
- package/dist/assets/attributeIcon/icon_canvasEdit4.svg.js +5 -1
- package/dist/assets/attributeIcon/icon_canvasEdit5.svg.js +5 -1
- package/dist/assets/attributeIcon/icon_canvasEdit6.svg.js +5 -1
- package/dist/assets/attributeIcon/icon_canvasEdit7.svg.js +5 -1
- package/dist/assets/attributeIcon/icon_canvasEdit8.svg.js +5 -1
- package/dist/assets/attributeIcon/icon_canvasEdit_miss.svg.js +5 -1
- package/dist/assets/attributeIcon/icon_cuboidFAB.svg.js +5 -5
- package/dist/assets/attributeIcon/icon_cuboidLeft.svg.js +5 -7
- package/dist/assets/attributeIcon/icon_cuboidMore.svg.js +5 -5
- package/dist/assets/attributeIcon/icon_cuboidRight.svg.js +5 -5
- package/dist/assets/attributeIcon/icon_cuboidTop.svg.js +5 -12
- package/dist/assets/attributeIcon/icon_editFEN.svg.js +5 -1
- package/dist/assets/attributeIcon/icon_editHUANG.svg.js +5 -1
- package/dist/assets/attributeIcon/icon_editLAN.svg.js +5 -1
- package/dist/assets/attributeIcon/icon_editLV.svg.js +5 -1
- package/dist/assets/attributeIcon/icon_editQING.svg.js +5 -1
- package/dist/constant/annotation.js +127 -1
- package/dist/constant/annotationTask.js +30 -1
- package/dist/constant/defaultConfig.js +266 -1
- package/dist/constant/keyCode.js +38 -1
- package/dist/constant/style.js +98 -1
- package/dist/constant/tool.js +236 -1
- package/dist/core/index.js +150 -1
- package/dist/core/pointCloud/OrbitControls.js +665 -1
- package/dist/core/pointCloud/PCDLoader.js +260 -2
- package/dist/core/pointCloud/annotation.js +215 -1
- package/dist/core/pointCloud/cache.js +53 -1
- package/dist/core/pointCloud/index.js +991 -5
- package/dist/core/pointCloud/matrix.js +138 -1
- package/dist/core/pointCloud/segmentation.js +144 -0
- package/dist/core/pointCloud/selector/Sse3dLassoSelector.js +26 -0
- package/dist/core/pointCloud/selector/Sse3dSelector.js +16 -0
- package/dist/core/scheduler.js +233 -1
- package/dist/core/toolOperation/LineToolOperation.js +1434 -1
- package/dist/core/toolOperation/ScribbleTool.js +292 -1
- package/dist/core/toolOperation/TextToolOperation.js +131 -1
- package/dist/core/toolOperation/ViewOperation.js +556 -1
- package/dist/core/toolOperation/basicToolOperation.js +881 -1
- package/dist/core/toolOperation/checkOperation.js +208 -1
- package/dist/core/toolOperation/cuboidOperation.js +754 -1
- package/dist/core/toolOperation/cuboidToggleButtonClass.js +152 -7
- package/dist/core/toolOperation/eventListener.js +37 -1
- package/dist/core/toolOperation/measureOperation.js +41 -1
- package/dist/core/toolOperation/pointCloud2dOperation.js +365 -1
- package/dist/core/toolOperation/pointOperation.js +696 -1
- package/dist/core/toolOperation/polygonOperation.js +1251 -1
- package/dist/core/toolOperation/rectOperation.js +1233 -1
- package/dist/core/toolOperation/segmentByRect.js +174 -1
- package/dist/core/toolOperation/tagOperation.js +201 -3
- package/dist/core/toolOperation/textAttributeClass.js +182 -16
- package/dist/index.js +185 -1
- package/dist/locales/constants.js +24 -1
- package/dist/locales/en_US/message.js +25 -1
- package/dist/locales/index.js +19 -1
- package/dist/locales/zh_CN/message.js +25 -1
- package/dist/newCore/CanvasScheduler.js +35 -1
- package/dist/types/core/pointCloud/segmentation.d.ts +0 -0
- package/dist/types/core/pointCloud/selector/Sse3dLassoSelector.d.ts +0 -0
- package/dist/types/core/pointCloud/selector/Sse3dSelector.d.ts +0 -0
- package/dist/utils/ActionsHistory.js +84 -1
- package/dist/utils/ImgUtils.js +23 -1
- package/dist/utils/MathUtils.js +385 -2
- package/dist/utils/VectorUtils.js +25 -1
- package/dist/utils/tool/AttributeUtils.js +218 -1
- package/dist/utils/tool/AxisUtils.js +340 -1
- package/dist/utils/tool/CanvasUtils.js +62 -1
- package/dist/utils/tool/CommonToolUtils.js +174 -1
- package/dist/utils/tool/CuboidUtils.js +704 -1
- package/dist/utils/tool/DblClickEventListener.js +102 -1
- package/dist/utils/tool/DrawUtils.js +492 -3
- package/dist/utils/tool/EnhanceCommonToolUtils.js +53 -1
- package/dist/utils/tool/ImgPosUtils.js +58 -1
- package/dist/utils/tool/LineToolUtils.js +261 -1
- package/dist/utils/tool/MarkerUtils.js +56 -1
- package/dist/utils/tool/PolygonUtils.js +460 -1
- package/dist/utils/tool/RectUtils.js +155 -1
- package/dist/utils/tool/RenderDomClass.js +57 -7
- package/dist/utils/tool/RenderDomUtils.js +21 -4
- package/dist/utils/tool/StyleUtils.js +31 -1
- package/dist/utils/tool/TagUtils.js +129 -1
- package/dist/utils/tool/UnitUtils.js +12 -1
- package/dist/utils/tool/ZoomUtils.js +72 -1
- package/dist/utils/tool/polygonTool.js +133 -1
- package/dist/utils/uuid.js +26 -1
- package/es/_virtual/MathUtilsWorker.js +6 -1
- package/es/_virtual/_rollup-plugin-web-worker-loader__helper__auto__createBase64WorkerFactory.js +12 -0
- package/es/_virtual/_rollup-plugin-web-worker-loader__helper__auto__isNodeJS.js +7 -0
- package/es/_virtual/_rollup-plugin-web-worker-loader__helper__browser__createBase64WorkerFactory.js +31 -2
- package/es/_virtual/_rollup-plugin-web-worker-loader__helper__node__WorkerClass.js +11 -0
- package/es/_virtual/_rollup-plugin-web-worker-loader__helper__node__createBase64WorkerFactory.js +18 -0
- package/es/_virtual/filterBoxWorker.js +6 -1
- package/es/_virtual/highlightWorker.js +6 -1
- package/es/assets/attributeIcon/icon_canvasEdit0.svg.js +3 -1
- package/es/assets/attributeIcon/icon_canvasEdit1.svg.js +3 -1
- package/es/assets/attributeIcon/icon_canvasEdit2.svg.js +3 -1
- package/es/assets/attributeIcon/icon_canvasEdit3.svg.js +3 -1
- package/es/assets/attributeIcon/icon_canvasEdit4.svg.js +3 -1
- package/es/assets/attributeIcon/icon_canvasEdit5.svg.js +3 -1
- package/es/assets/attributeIcon/icon_canvasEdit6.svg.js +3 -1
- package/es/assets/attributeIcon/icon_canvasEdit7.svg.js +3 -1
- package/es/assets/attributeIcon/icon_canvasEdit8.svg.js +3 -1
- package/es/assets/attributeIcon/icon_canvasEdit_miss.svg.js +3 -1
- package/es/assets/attributeIcon/icon_cuboidFAB.svg.js +3 -5
- package/es/assets/attributeIcon/icon_cuboidLeft.svg.js +3 -7
- package/es/assets/attributeIcon/icon_cuboidMore.svg.js +3 -5
- package/es/assets/attributeIcon/icon_cuboidRight.svg.js +3 -5
- package/es/assets/attributeIcon/icon_cuboidTop.svg.js +3 -12
- package/es/assets/attributeIcon/icon_editFEN.svg.js +3 -1
- package/es/assets/attributeIcon/icon_editHUANG.svg.js +3 -1
- package/es/assets/attributeIcon/icon_editLAN.svg.js +3 -1
- package/es/assets/attributeIcon/icon_editLV.svg.js +3 -1
- package/es/assets/attributeIcon/icon_editQING.svg.js +3 -1
- package/es/constant/annotation.js +113 -1
- package/es/constant/annotationTask.js +25 -1
- package/es/constant/defaultConfig.js +260 -1
- package/es/constant/keyCode.js +36 -1
- package/es/constant/style.js +74 -1
- package/es/constant/tool.js +220 -1
- package/es/core/index.js +148 -1
- package/es/core/pointCloud/OrbitControls.js +661 -1
- package/es/core/pointCloud/PCDLoader.js +256 -2
- package/es/core/pointCloud/annotation.js +211 -1
- package/es/core/pointCloud/cache.js +49 -1
- package/es/core/pointCloud/index.js +962 -5
- package/es/core/pointCloud/matrix.js +109 -1
- package/es/core/pointCloud/segmentation.js +120 -0
- package/es/core/pointCloud/selector/Sse3dLassoSelector.js +24 -0
- package/es/core/pointCloud/selector/Sse3dSelector.js +14 -0
- package/es/core/scheduler.js +228 -1
- package/es/core/toolOperation/LineToolOperation.js +1421 -1
- package/es/core/toolOperation/ScribbleTool.js +290 -1
- package/es/core/toolOperation/TextToolOperation.js +129 -1
- package/es/core/toolOperation/ViewOperation.js +549 -1
- package/es/core/toolOperation/basicToolOperation.js +877 -1
- package/es/core/toolOperation/checkOperation.js +206 -1
- package/es/core/toolOperation/cuboidOperation.js +752 -1
- package/es/core/toolOperation/cuboidToggleButtonClass.js +150 -7
- package/es/core/toolOperation/eventListener.js +35 -1
- package/es/core/toolOperation/measureOperation.js +39 -1
- package/es/core/toolOperation/pointCloud2dOperation.js +359 -1
- package/es/core/toolOperation/pointOperation.js +690 -1
- package/es/core/toolOperation/polygonOperation.js +1245 -1
- package/es/core/toolOperation/rectOperation.js +1228 -1
- package/es/core/toolOperation/scribbleTool2.js +249 -0
- package/es/core/toolOperation/segmentByRect.js +172 -1
- package/es/core/toolOperation/tagOperation.js +199 -3
- package/es/core/toolOperation/textAttributeClass.js +180 -16
- package/es/index.js +46 -1
- package/es/locales/constants.js +22 -1
- package/es/locales/en_US/message.js +23 -1
- package/es/locales/index.js +17 -1
- package/es/locales/zh_CN/message.js +23 -1
- package/es/newCore/CanvasScheduler.js +31 -1
- package/es/utils/ActionsHistory.js +78 -1
- package/es/utils/ImgUtils.js +21 -1
- package/es/utils/MathUtils.js +380 -2
- package/es/utils/VectorUtils.js +23 -1
- package/es/utils/tool/AttributeUtils.js +212 -1
- package/es/utils/tool/AxisUtils.js +335 -1
- package/es/utils/tool/CanvasUtils.js +60 -1
- package/es/utils/tool/CommonToolUtils.js +172 -1
- package/es/utils/tool/CuboidUtils.js +680 -1
- package/es/utils/tool/DblClickEventListener.js +100 -1
- package/es/utils/tool/DrawUtils.js +490 -3
- package/es/utils/tool/EnhanceCommonToolUtils.js +48 -1
- package/es/utils/tool/ImgPosUtils.js +56 -1
- package/es/utils/tool/LineToolUtils.js +255 -1
- package/es/utils/tool/MarkerUtils.js +54 -1
- package/es/utils/tool/PolygonUtils.js +458 -1
- package/es/utils/tool/RectUtils.js +153 -1
- package/es/utils/tool/RenderDomClass.js +55 -7
- package/es/utils/tool/RenderDomUtils.js +19 -4
- package/es/utils/tool/StyleUtils.js +29 -1
- package/es/utils/tool/TagUtils.js +127 -1
- package/es/utils/tool/UnitUtils.js +10 -1
- package/es/utils/tool/ZoomUtils.js +70 -1
- package/es/utils/tool/polygonTool.js +126 -1
- package/es/utils/uuid.js +24 -1
- package/package.json +7 -5
|
@@ -1 +1,206 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { cloneDeep } from 'lodash';
|
|
2
|
+
import CommonToolUtils from '../../utils/tool/CommonToolUtils.js';
|
|
3
|
+
import RectUtils from '../../utils/tool/RectUtils.js';
|
|
4
|
+
import TagUtil from '../../utils/tool/TagUtils.js';
|
|
5
|
+
import { DEFAULT_TEXT_OFFSET } from '../../constant/annotation.js';
|
|
6
|
+
import { EToolName } from '../../constant/tool.js';
|
|
7
|
+
import AttributeUtils from '../../utils/tool/AttributeUtils.js';
|
|
8
|
+
import AxisUtils from '../../utils/tool/AxisUtils.js';
|
|
9
|
+
import DrawUtils from '../../utils/tool/DrawUtils.js';
|
|
10
|
+
import StyleUtils from '../../utils/tool/StyleUtils.js';
|
|
11
|
+
import { BasicToolOperation } from './basicToolOperation.js';
|
|
12
|
+
|
|
13
|
+
var __defProp = Object.defineProperty;
|
|
14
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
15
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
16
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
17
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, {enumerable: true, configurable: true, writable: true, value}) : obj[key] = value;
|
|
18
|
+
var __spreadValues = (a, b) => {
|
|
19
|
+
for (var prop in b || (b = {}))
|
|
20
|
+
if (__hasOwnProp.call(b, prop))
|
|
21
|
+
__defNormalProp(a, prop, b[prop]);
|
|
22
|
+
if (__getOwnPropSymbols)
|
|
23
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
24
|
+
if (__propIsEnum.call(b, prop))
|
|
25
|
+
__defNormalProp(a, prop, b[prop]);
|
|
26
|
+
}
|
|
27
|
+
return a;
|
|
28
|
+
};
|
|
29
|
+
const TEXT_ATTRIBUTE_OFFSET = {
|
|
30
|
+
x: 8,
|
|
31
|
+
y: 26
|
|
32
|
+
};
|
|
33
|
+
const newScope = 2;
|
|
34
|
+
class CheckOperation extends BasicToolOperation {
|
|
35
|
+
constructor(props) {
|
|
36
|
+
super(props);
|
|
37
|
+
this.getHoverRectID = (e) => {
|
|
38
|
+
var _a, _b;
|
|
39
|
+
const coordinate = this.getCoordinateUnderZoom(e);
|
|
40
|
+
const currentShowList = (_b = (_a = this.resultList.find((v) => v.toolName === EToolName.Rect)) == null ? void 0 : _a.result) != null ? _b : [];
|
|
41
|
+
if (currentShowList.length > 0) {
|
|
42
|
+
const hoverList = currentShowList.filter((rect) => RectUtils.isInRect(coordinate, rect, newScope, this.zoom));
|
|
43
|
+
if (hoverList.length === 0) {
|
|
44
|
+
return "";
|
|
45
|
+
}
|
|
46
|
+
if (hoverList.length === 1) {
|
|
47
|
+
return hoverList[0].id;
|
|
48
|
+
}
|
|
49
|
+
if (hoverList.length > 1) {
|
|
50
|
+
const rectSizeList = hoverList.map((rect) => ({size: rect.width * rect.height, id: rect.id})).sort((a, b) => a.size - b.size);
|
|
51
|
+
return rectSizeList[0].id;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
return "";
|
|
55
|
+
};
|
|
56
|
+
this.resultList = [];
|
|
57
|
+
this.hoverID = [];
|
|
58
|
+
this.fillID = [];
|
|
59
|
+
this.render = this.render.bind(this);
|
|
60
|
+
this.drawPolygon = this.drawPolygon.bind(this);
|
|
61
|
+
this.drawRect = this.drawRect.bind(this);
|
|
62
|
+
this.drawTag = this.drawTag.bind(this);
|
|
63
|
+
this.setShowDefaultCursor(true);
|
|
64
|
+
this.forbidOperation = true;
|
|
65
|
+
}
|
|
66
|
+
onMouseDown(e) {
|
|
67
|
+
var _a, _b;
|
|
68
|
+
if (super.onMouseDown(e) || this.forbidMouseOperation || !this.imgInfo) {
|
|
69
|
+
return true;
|
|
70
|
+
}
|
|
71
|
+
const newMouseSelectedID = this.mouseHoverID;
|
|
72
|
+
const currentShowList = (_b = (_a = this.resultList.find((v) => v.toolName === EToolName.Rect)) == null ? void 0 : _a.result) != null ? _b : [];
|
|
73
|
+
if (e.button === 0) {
|
|
74
|
+
let selectedID = [newMouseSelectedID];
|
|
75
|
+
let isShow = true;
|
|
76
|
+
if (newMouseSelectedID && currentShowList.find((rect) => rect.id === newMouseSelectedID && (rect == null ? void 0 : rect.isSelected))) {
|
|
77
|
+
isShow = false;
|
|
78
|
+
}
|
|
79
|
+
if (!newMouseSelectedID) {
|
|
80
|
+
selectedID = currentShowList.map((rect) => rect.id);
|
|
81
|
+
isShow = false;
|
|
82
|
+
}
|
|
83
|
+
this.emit("setSelectedID", selectedID, isShow);
|
|
84
|
+
this.render();
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
updateRotate() {
|
|
88
|
+
}
|
|
89
|
+
onMouseMove(e) {
|
|
90
|
+
if (super.onMouseMove(e) || this.forbidMouseOperation || !this.imgInfo) {
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
const oldMouseHoverID = this.mouseHoverID;
|
|
94
|
+
const newMouseHoverID = this.getHoverRectID(e);
|
|
95
|
+
if (oldMouseHoverID !== newMouseHoverID) {
|
|
96
|
+
this.mouseHoverID = newMouseHoverID;
|
|
97
|
+
let hoverID = [newMouseHoverID];
|
|
98
|
+
if (!newMouseHoverID) {
|
|
99
|
+
hoverID = [];
|
|
100
|
+
}
|
|
101
|
+
this.emit("setHoverID", hoverID);
|
|
102
|
+
this.render();
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
setResult(result) {
|
|
106
|
+
this.resultList = cloneDeep(result);
|
|
107
|
+
this.render();
|
|
108
|
+
}
|
|
109
|
+
drawPolygon(polygonList, config) {
|
|
110
|
+
polygonList == null ? void 0 : polygonList.forEach((polygon) => {
|
|
111
|
+
var _a, _b, _c, _d, _e;
|
|
112
|
+
const toolColor = this.getColor(polygon.attribute, config);
|
|
113
|
+
const toolData = StyleUtils.getStrokeAndFill(toolColor, polygon.valid);
|
|
114
|
+
let thickness = (_b = (_a = this.style) == null ? void 0 : _a.width) != null ? _b : 2;
|
|
115
|
+
if (this.hoverID.includes(polygon.id)) {
|
|
116
|
+
thickness = 4;
|
|
117
|
+
DrawUtils.drawPolygonWithFillAndLine(this.canvas, AxisUtils.changePointListByZoom(polygon.pointList, this.zoom, this.currentPos), {
|
|
118
|
+
fillColor: toolData.fill,
|
|
119
|
+
strokeColor: toolData.stroke,
|
|
120
|
+
pointColor: "white",
|
|
121
|
+
thickness,
|
|
122
|
+
lineCap: "round",
|
|
123
|
+
isClose: true,
|
|
124
|
+
lineType: config == null ? void 0 : config.lineType
|
|
125
|
+
});
|
|
126
|
+
} else {
|
|
127
|
+
DrawUtils.drawPolygon(this.canvas, AxisUtils.changePointListByZoom(polygon.pointList, this.zoom, this.currentPos), {
|
|
128
|
+
color: toolData.fill,
|
|
129
|
+
lineType: (_c = this.config) == null ? void 0 : _c.lineType,
|
|
130
|
+
thickness,
|
|
131
|
+
isClose: true
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
let showText = `${(_e = AttributeUtils.getAttributeShowText(polygon.attribute, (_d = config == null ? void 0 : config.attributeList) != null ? _d : [])) != null ? _e : ""}`;
|
|
135
|
+
if ((config == null ? void 0 : config.isShowOrder) && (polygon == null ? void 0 : polygon.order) > 0) {
|
|
136
|
+
showText = `${polygon.order} ${showText}`;
|
|
137
|
+
}
|
|
138
|
+
DrawUtils.drawText(this.canvas, AxisUtils.changePointByZoom(polygon.pointList[0], this.zoom, this.currentPos), showText, __spreadValues({
|
|
139
|
+
color: toolData.stroke
|
|
140
|
+
}, DEFAULT_TEXT_OFFSET));
|
|
141
|
+
const transformPointList = AxisUtils.changePointListByZoom(polygon.pointList || [], this.zoom, this.currentPos);
|
|
142
|
+
const endPoint = transformPointList[transformPointList.length - 1];
|
|
143
|
+
DrawUtils.drawText(this.canvas, {x: endPoint.x + TEXT_ATTRIBUTE_OFFSET.x, y: endPoint.y + TEXT_ATTRIBUTE_OFFSET.y}, polygon == null ? void 0 : polygon.textAttribute, __spreadValues({
|
|
144
|
+
color: toolData.stroke
|
|
145
|
+
}, DEFAULT_TEXT_OFFSET));
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
drawRect(rectList, config) {
|
|
149
|
+
rectList == null ? void 0 : rectList.forEach((rect) => {
|
|
150
|
+
let thickness = 1;
|
|
151
|
+
if (this.hoverID.includes(rect.id)) {
|
|
152
|
+
thickness = 3;
|
|
153
|
+
}
|
|
154
|
+
const toolColor = this.getColor(rect.attribute, config);
|
|
155
|
+
const renderRect = AxisUtils.changeRectByZoom(rect, this.zoom, this.currentPos);
|
|
156
|
+
DrawUtils.drawRect(this.canvas, renderRect, {
|
|
157
|
+
color: (rect == null ? void 0 : rect.valid) ? toolColor.valid.stroke : toolColor.invalid.stroke,
|
|
158
|
+
thickness
|
|
159
|
+
});
|
|
160
|
+
if (this.fillID.includes(rect.id)) {
|
|
161
|
+
DrawUtils.drawRectWithFill(this.canvas, renderRect, {
|
|
162
|
+
color: (rect == null ? void 0 : rect.valid) ? toolColor.valid.fill : toolColor.invalid.fill
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
drawTag(tagList, config) {
|
|
168
|
+
const tagInfoList = tagList.reduce((acc, cur) => {
|
|
169
|
+
return [
|
|
170
|
+
...acc,
|
|
171
|
+
...(config == null ? void 0 : config.inputList) ? TagUtil.getTagNameList(cur.result, config.inputList) : TagUtil.getTagnameListWithoutConfig(cur.result)
|
|
172
|
+
];
|
|
173
|
+
}, []);
|
|
174
|
+
DrawUtils.drawTag(this.canvas, tagInfoList);
|
|
175
|
+
}
|
|
176
|
+
setHoverID(hoverID) {
|
|
177
|
+
this.hoverID = hoverID;
|
|
178
|
+
this.render();
|
|
179
|
+
}
|
|
180
|
+
setFillID(fillID) {
|
|
181
|
+
this.fillID = fillID;
|
|
182
|
+
this.render();
|
|
183
|
+
}
|
|
184
|
+
render() {
|
|
185
|
+
var _a;
|
|
186
|
+
super.render();
|
|
187
|
+
(_a = this.resultList) == null ? void 0 : _a.forEach((item) => {
|
|
188
|
+
switch (item == null ? void 0 : item.toolName) {
|
|
189
|
+
case EToolName.Rect:
|
|
190
|
+
this.drawRect(item.result, CommonToolUtils.jsonParser(item.config));
|
|
191
|
+
break;
|
|
192
|
+
case EToolName.Polygon:
|
|
193
|
+
this.drawPolygon(item.result, CommonToolUtils.jsonParser(item.config));
|
|
194
|
+
break;
|
|
195
|
+
case EToolName.Tag:
|
|
196
|
+
this.drawTag(item.result, CommonToolUtils.jsonParser(item.config));
|
|
197
|
+
break;
|
|
198
|
+
}
|
|
199
|
+
});
|
|
200
|
+
}
|
|
201
|
+
exportData() {
|
|
202
|
+
return [[], {}];
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
export { CheckOperation as default };
|