@labelbee/lb-annotation 1.8.0 → 1.9.0-alpha.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.
Files changed (96) hide show
  1. package/README.md +65 -0
  2. package/dist/index.js +20 -9
  3. package/dist/types/constant/tool.d.ts +3 -1
  4. package/dist/types/core/index.d.ts +24 -4
  5. package/dist/types/core/pointCloud/OrbitControls.d.ts +60 -0
  6. package/dist/types/core/pointCloud/PCDLoader.d.ts +11 -0
  7. package/dist/types/core/pointCloud/annotation.d.ts +47 -0
  8. package/dist/types/core/pointCloud/cache.d.ts +16 -0
  9. package/dist/types/core/pointCloud/index.d.ts +325 -0
  10. package/dist/types/core/scheduler.d.ts +71 -0
  11. package/dist/types/core/toolOperation/basicToolOperation.d.ts +20 -2
  12. package/dist/types/core/toolOperation/eventListener.d.ts +2 -2
  13. package/dist/types/core/toolOperation/pointCloud2dOperation.d.ts +80 -0
  14. package/dist/types/core/toolOperation/polygonOperation.d.ts +21 -7
  15. package/dist/types/core/toolOperation/segmentByRect.d.ts +31 -0
  16. package/dist/types/index.d.ts +9 -3
  17. package/dist/types/newCore/CanvasScheduler.d.ts +31 -0
  18. package/dist/types/newCore/index.d.ts +1 -0
  19. package/dist/types/utils/MathUtils.d.ts +6 -0
  20. package/dist/types/utils/tool/CommonToolUtils.d.ts +0 -13
  21. package/dist/types/utils/tool/EnhanceCommonToolUtils.d.ts +20 -0
  22. package/dist/types/utils/tool/PolygonUtils.d.ts +1 -0
  23. package/es/assets/attributeIcon/icon_canvasEdit0.svg.js +3 -0
  24. package/es/assets/attributeIcon/icon_canvasEdit1.svg.js +3 -0
  25. package/es/assets/attributeIcon/icon_canvasEdit2.svg.js +3 -0
  26. package/es/assets/attributeIcon/icon_canvasEdit3.svg.js +3 -0
  27. package/es/assets/attributeIcon/icon_canvasEdit4.svg.js +3 -0
  28. package/es/assets/attributeIcon/icon_canvasEdit5.svg.js +3 -0
  29. package/es/assets/attributeIcon/icon_canvasEdit6.svg.js +3 -0
  30. package/es/assets/attributeIcon/icon_canvasEdit7.svg.js +3 -0
  31. package/es/assets/attributeIcon/icon_canvasEdit8.svg.js +3 -0
  32. package/es/assets/attributeIcon/icon_canvasEdit_miss.svg.js +3 -0
  33. package/es/assets/attributeIcon/icon_editFEN.svg.js +3 -0
  34. package/es/assets/attributeIcon/icon_editHUANG.svg.js +3 -0
  35. package/es/assets/attributeIcon/icon_editLAN.svg.js +3 -0
  36. package/es/assets/attributeIcon/icon_editLV.svg.js +3 -0
  37. package/es/assets/attributeIcon/icon_editQING.svg.js +3 -0
  38. package/es/constant/annotation.js +68 -0
  39. package/es/constant/annotationTask.js +25 -0
  40. package/es/constant/defaultConfig.js +260 -0
  41. package/es/constant/keyCode.js +36 -0
  42. package/es/constant/style.js +67 -0
  43. package/es/constant/tool.js +183 -0
  44. package/es/core/index.js +145 -0
  45. package/es/core/pointCloud/OrbitControls.js +661 -0
  46. package/es/core/pointCloud/PCDLoader.js +238 -0
  47. package/es/core/pointCloud/annotation.js +98 -0
  48. package/es/core/pointCloud/cache.js +42 -0
  49. package/es/core/pointCloud/index.js +771 -0
  50. package/es/core/scheduler.js +184 -0
  51. package/es/core/toolOperation/LineToolOperation.js +1369 -0
  52. package/es/core/toolOperation/TextToolOperation.js +129 -0
  53. package/es/core/toolOperation/ViewOperation.js +410 -0
  54. package/es/core/toolOperation/basicToolOperation.js +817 -0
  55. package/es/core/toolOperation/checkOperation.js +206 -0
  56. package/es/core/toolOperation/eventListener.js +35 -0
  57. package/es/core/toolOperation/measureOperation.js +39 -0
  58. package/es/core/toolOperation/pointCloud2dOperation.js +197 -0
  59. package/es/core/toolOperation/pointOperation.js +603 -0
  60. package/es/core/toolOperation/polygonOperation.js +1201 -0
  61. package/es/core/toolOperation/rectOperation.js +1170 -0
  62. package/es/core/toolOperation/segmentByRect.js +172 -0
  63. package/es/core/toolOperation/tagOperation.js +215 -0
  64. package/es/core/toolOperation/textAttributeClass.js +201 -0
  65. package/es/index.js +25 -14
  66. package/es/locales/constants.js +21 -0
  67. package/es/locales/en_US/message.js +22 -0
  68. package/es/locales/index.js +17 -0
  69. package/es/locales/zh_CN/message.js +22 -0
  70. package/es/newCore/CanvasScheduler.js +31 -0
  71. package/es/utils/ActionsHistory.js +78 -0
  72. package/es/utils/ImgUtils.js +20 -0
  73. package/es/utils/MathUtils.js +283 -0
  74. package/es/utils/VectorUtils.js +23 -0
  75. package/es/utils/tool/AttributeUtils.js +196 -0
  76. package/es/utils/tool/AxisUtils.js +254 -0
  77. package/es/utils/tool/CanvasUtils.js +60 -0
  78. package/es/utils/tool/CommonToolUtils.js +172 -0
  79. package/es/utils/tool/CurrentOperation.js +35 -0
  80. package/es/utils/tool/DblClickEventListener.js +100 -0
  81. package/es/utils/tool/DrawUtils.js +424 -0
  82. package/es/utils/tool/EnhanceCommonToolUtils.js +39 -0
  83. package/es/utils/tool/ImgPosUtils.js +56 -0
  84. package/es/utils/tool/LineToolUtils.js +255 -0
  85. package/es/utils/tool/MarkerUtils.js +9 -0
  86. package/es/utils/tool/PolygonUtils.js +458 -0
  87. package/es/utils/tool/RectUtils.js +153 -0
  88. package/es/utils/tool/RenderDomClass.js +68 -0
  89. package/es/utils/tool/RenderDomUtils.js +29 -0
  90. package/es/utils/tool/StyleUtils.js +29 -0
  91. package/es/utils/tool/TagUtils.js +127 -0
  92. package/es/utils/tool/UnitUtils.js +10 -0
  93. package/es/utils/tool/ZoomUtils.js +70 -0
  94. package/es/utils/tool/polygonTool.js +126 -0
  95. package/es/utils/uuid.js +24 -0
  96. package/package.json +6 -4
@@ -0,0 +1,260 @@
1
+ const rectToolConfig = {
2
+ showConfirm: false,
3
+ skipWhileNoDependencies: false,
4
+ drawOutsideTarget: false,
5
+ copyBackwardResult: false,
6
+ minWidth: 1,
7
+ minHeight: 1,
8
+ isShowOrder: false,
9
+ filterData: ["valid", "invalid"],
10
+ attributeConfigurable: false,
11
+ attributeList: [],
12
+ textConfigurable: false,
13
+ textCheckType: 0,
14
+ customFormat: ""
15
+ };
16
+ const tagToolConfig = {
17
+ showConfirm: false,
18
+ skipWhileNoDependencies: false,
19
+ inputList: [
20
+ {
21
+ key: "\u7C7B\u522B1",
22
+ value: "class1",
23
+ isMulti: false,
24
+ subSelected: [
25
+ {key: "\u9009\u98791", value: "option1", isDefault: false},
26
+ {key: "\u9009\u98792", value: "option1-2", isDefault: false}
27
+ ]
28
+ },
29
+ {
30
+ key: "\u7C7B\u522B2",
31
+ value: "class-AH",
32
+ isMulti: true,
33
+ subSelected: [
34
+ {key: "\u9009\u98792-1", value: "option2-1", isDefault: false},
35
+ {key: "\u9009\u98792-2", value: "option2-2", isDefault: false},
36
+ {key: "\u9009\u98792-3", value: "option2-3", isDefault: false}
37
+ ]
38
+ },
39
+ {
40
+ key: "\u7C7B\u522B3",
41
+ value: "class-0P",
42
+ isMulti: false,
43
+ subSelected: [
44
+ {key: "\u9009\u98793-1", value: "option3-1", isMulti: false},
45
+ {key: "\u9009\u98793-2", value: "option3-2", isDefault: false},
46
+ {key: "\u9009\u98793-3", value: "option3-3", isDefault: false}
47
+ ]
48
+ }
49
+ ]
50
+ };
51
+ const lineToolConfig = {
52
+ lineType: 0,
53
+ lineColor: 0,
54
+ edgeAdsorption: false,
55
+ outOfTarget: true,
56
+ copyBackwardResult: false,
57
+ isShowOrder: false,
58
+ attributeConfigurable: false,
59
+ attributeList: [
60
+ {key: "\u7C7B\u522B1", value: "\u7C7B\u522B1"},
61
+ {key: "\u7C7B\u522Bao", value: "class-ao"},
62
+ {key: "\u7C7B\u522BM1", value: "class-M1"},
63
+ {key: "\u7C7B\u522BCm", value: "class-Cm"},
64
+ {key: "\u7C7B\u522Bc3", value: "class-c3"},
65
+ {key: "\u7C7B\u522Ba0", value: "class-a0"},
66
+ {key: "\u7C7B\u522Bu7", value: "class-u7"},
67
+ {key: "\u7C7B\u522BZb", value: "class-Zb"},
68
+ {key: "\u7C7B\u522Bzi", value: "class-zi"}
69
+ ],
70
+ textConfigurable: false,
71
+ textCheckType: 2,
72
+ customFormat: "",
73
+ showConfirm: false,
74
+ lowerLimitPointNum: 2,
75
+ upperLimitPointNum: "",
76
+ preReferenceStep: 0,
77
+ skipWhileNoDependencies: false,
78
+ filterData: ["valid", "invalid"]
79
+ };
80
+ const textToolConfig = {
81
+ showConfirm: false,
82
+ skipWhileNoDependencies: false,
83
+ enableTextRecognition: false,
84
+ recognitionMode: "general",
85
+ configList: [{label: "\u6587\u672C", key: "text", required: false, default: "", maxLength: 1e3}],
86
+ filterData: ["valid", "invalid"]
87
+ };
88
+ const polygonConfig = {
89
+ lineType: 0,
90
+ lineColor: 0,
91
+ lowerLimitPointNum: 3,
92
+ edgeAdsorption: false,
93
+ drawOutsideTarget: false,
94
+ copyBackwardResult: false,
95
+ isShowOrder: false,
96
+ attributeConfigurable: false,
97
+ attributeList: [],
98
+ textConfigurable: true,
99
+ textCheckType: 0,
100
+ customFormat: ""
101
+ };
102
+ const getConfig = (tool) => {
103
+ if (tool === "lineTool") {
104
+ return lineToolConfig;
105
+ }
106
+ if (tool === "rectTool") {
107
+ return rectToolConfig;
108
+ }
109
+ if (tool === "tagTool") {
110
+ return tagToolConfig;
111
+ }
112
+ if (tool === "textTool") {
113
+ return textToolConfig;
114
+ }
115
+ if (tool === "polygonTool") {
116
+ return polygonConfig;
117
+ }
118
+ return rectToolConfig;
119
+ };
120
+ const styleDefaultConfig = {
121
+ toolColor: {
122
+ 1: {
123
+ valid: {stroke: "rgba(0,0,255,0.50)", fill: "rgba(0,0,255,0.40)"},
124
+ invalid: {stroke: "rgba(255,153,102,1.00)", fill: "rgba(255,153,102,0.80)"},
125
+ validSelected: {stroke: "rgba(0,15,255,1.00)", fill: "rgba(0,15,255,0.80)"},
126
+ invalidSelected: {stroke: "rgba(255,0,0,0.60)", fill: "rgba(255,0,0,0.24)"},
127
+ validHover: {stroke: "rgba(0,15,255,0.80)", fill: "rgba(0,15,255,0.64)"},
128
+ invalidHover: {stroke: "rgba(255,0,0,0.50)", fill: "rgba(255,0,0,0.40)"}
129
+ },
130
+ 3: {
131
+ valid: {stroke: "rgba(0,255,255,0.50)", fill: "rgba(0,255,255,0.40)"},
132
+ invalid: {stroke: "rgba(255,153,102,1.00)", fill: "rgba(255,153,102,0.80)"},
133
+ validSelected: {stroke: "rgba(0,212,255,1.00)", fill: "rgba(0,212,255,0.80)"},
134
+ invalidSelected: {stroke: "rgba(255,0,0,0.60)", fill: "rgba(255,0,0,0.24)"},
135
+ validHover: {stroke: "rgba(0,212,255,0.80)", fill: "rgba(0,212,255,0.64)"},
136
+ invalidHover: {stroke: "rgba(255,0,0,0.50)", fill: "rgba(255,0,0,0.40)"}
137
+ },
138
+ 5: {
139
+ valid: {stroke: "rgba(0,255,0,0.50)", fill: "rgba(0,255,0,0.40)"},
140
+ invalid: {stroke: "rgba(255,153,102,1.00)", fill: "rgba(255,153,102,0.80)"},
141
+ validSelected: {stroke: "rgba(149,255,1.00)", fill: "rgba(149,255,0,0.80)"},
142
+ invalidSelected: {stroke: "rgba(255,0,0,0.60)", fill: "rgba(255,0,0,0.24)"},
143
+ validHover: {stroke: "rgba(149,255,0,0.80)", fill: "rgba(149,255,0,0.64)"},
144
+ invalidHover: {stroke: "rgba(255,0,0,0.50)", fill: "rgba(255,0,0,0.40)"}
145
+ },
146
+ 7: {
147
+ valid: {stroke: "rgba(255,255,0,0.50)", fill: "rgba(255,255,0,0.40)"},
148
+ invalid: {stroke: "rgba(255,153,102,1.00)", fill: "rgba(255,153,102,0.80)"},
149
+ validSelected: {stroke: "rgba(255,230,102,1.00)", fill: "rgba(255,213,0,0.80)"},
150
+ invalidSelected: {stroke: "rgba(255,0,0,0.60)", fill: "rgba(255,0,0,0.24)"},
151
+ validHover: {stroke: "rgba(255,230,102,0.80)", fill: "rgba(255,230,102,0.64)"},
152
+ invalidHover: {stroke: "rgba(255,0,0,0.50)", fill: "rgba(255,0,0,0.40)"}
153
+ },
154
+ 9: {
155
+ valid: {stroke: "rgba(255,0,255,0.50)", fill: "rgba(255,0,255,0.40)"},
156
+ invalid: {stroke: "rgba(255,153,102,1.00)", fill: "rgba(255,153,102,0.80)"},
157
+ validSelected: {stroke: "rgba(230,102,255,1.00)", fill: "rgba(213,0,255,0.80)"},
158
+ invalidSelected: {stroke: "rgba(255,0,0,0.60)", fill: "rgba(255,0,0,0.24)"},
159
+ validHover: {stroke: "rgba(230,102,255,0.80)", fill: "rgba(230,102,255,0.64)"},
160
+ invalidHover: {stroke: "rgba(255,0,0,0.50)", fill: "rgba(255,0,0,0.40)"}
161
+ }
162
+ },
163
+ attributeColor: [
164
+ {
165
+ valid: {stroke: "rgba(204,204,204,1.00)", fill: "rgba(204,204,204,0.40)"},
166
+ invalid: {stroke: "rgba(255,153,102,1.00)", fill: "rgba(255,153,102,0.40)"},
167
+ validSelected: {stroke: "rgba(204,204,204,1.00)", fill: "rgba(204,204,204,0.80)"},
168
+ invalidSelected: {stroke: "rgba(255,0,0,1.00)", fill: "rgba(255,0,0,0.80)"},
169
+ validHover: {stroke: "rgba(204,204,204,1.00)", fill: "rgba(204,204,204,0.80)"},
170
+ invalidHover: {stroke: "rgba(255,0,0,1.00)", fill: "rgba(255,0,0,0.80)"}
171
+ },
172
+ {
173
+ valid: {stroke: "rgba(153,51,255,1.00)", fill: "rgba(153,51,255,0.40)"},
174
+ invalid: {stroke: "rgba(255,153,102,1.00)", fill: "rgba(255,153,102,0.40)"},
175
+ validSelected: {stroke: "rgba(153,51,255,1.00)", fill: "rgba(153,51,255,0.80)"},
176
+ invalidSelected: {stroke: "rgba(255,0,0,1.00)", fill: "rgba(255,0,0,0.80)"},
177
+ validHover: {stroke: "rgba(153,51,255,1.00)", fill: "rgba(153,51,255,0.80)"},
178
+ invalidHover: {stroke: "rgba(255,0,0,1.00)", fill: "rgba(255,0,0,0.80)"}
179
+ },
180
+ {
181
+ valid: {stroke: "rgba(51,254,51,1.00)", fill: "rgba(51,254,51,0.40)"},
182
+ invalid: {stroke: "rgba(255,153,102,1.00)", fill: "rgba(255,153,102,0.40)"},
183
+ validSelected: {stroke: "rgba(51,254,51,1.00)", fill: "rgba(51,254,51,0.80)"},
184
+ invalidSelected: {stroke: "rgba(255,0,0,1.00)", fill: "rgba(255,0,0,0.80)"},
185
+ validHover: {stroke: "rgba(51,254,51,1.00)", fill: "rgba(51,254,51,0.80)"},
186
+ invalidHover: {stroke: "rgba(255,0,0,1.00)", fill: "rgba(255,0,0,0.80)"}
187
+ },
188
+ {
189
+ valid: {stroke: "rgba(255,51,255,1.00)", fill: "rgba(255,51,255,0.40)"},
190
+ invalid: {stroke: "rgba(255,153,102,1.00)", fill: "rgba(255,153,102,0.40)"},
191
+ validSelected: {stroke: "rgba(255,51,255,1.00)", fill: "rgba(255,51,255,0.80)"},
192
+ invalidSelected: {stroke: "rgba(255,0,0,1.00)", fill: "rgba(255,0,0,0.80)"},
193
+ validHover: {stroke: "rgba(255,51,255,1.00)", fill: "rgba(255,51,255,0.80)"},
194
+ invalidHover: {stroke: "rgba(255,0,0,1.00)", fill: "rgba(255,0,0,0.80)"}
195
+ },
196
+ {
197
+ valid: {stroke: "rgba(204,255,51,1.00)", fill: "rgba(204,255,51,0.40)"},
198
+ invalid: {stroke: "rgba(255,153,102,1.00)", fill: "rgba(255,153,102,0.40)"},
199
+ validSelected: {stroke: "rgba(204,255,51,1.00)", fill: "rgba(204,255,51,0.80)"},
200
+ invalidSelected: {stroke: "rgba(255,0,0,1.00)", fill: "rgba(255,0,0,0.80)"},
201
+ validHover: {stroke: "rgba(204,255,51,1.00)", fill: "rgba(204,255,51,0.80)"},
202
+ invalidHover: {stroke: "rgba(255,0,0,1.00)", fill: "rgba(255,0,0,0.80)"}
203
+ },
204
+ {
205
+ valid: {stroke: "rgba(51,153,255,1.00)", fill: "rgba(51,153,255,0.40)"},
206
+ invalid: {stroke: "rgba(255,153,102,1.00)", fill: "rgba(255,153,102,0.40)"},
207
+ validSelected: {stroke: "rgba(51,153,255,1.00)", fill: "rgba(51,153,255,0.80)"},
208
+ invalidSelected: {stroke: "rgba(255,0,0,1.00)", fill: "rgba(255,0,0,0.80)"},
209
+ validHover: {stroke: "rgba(51,153,255,1.00)", fill: "rgba(51,153,255,0.80)"},
210
+ invalidHover: {stroke: "rgba(255,0,0,1.00)", fill: "rgba(255,0,0,0.80)"}
211
+ },
212
+ {
213
+ valid: {stroke: "rgba(255,153,51,1.00)", fill: "rgba(255,153,51,0.40)"},
214
+ invalid: {stroke: "rgba(255,153,102,1.00)", fill: "rgba(255,153,102,0.40)"},
215
+ validSelected: {stroke: "rgba(255,153,51,1.00)", fill: "rgba(255,153,51,0.80)"},
216
+ invalidSelected: {stroke: "rgba(255,0,0,1.00)", fill: "rgba(255,0,0,0.80)"},
217
+ validHover: {stroke: "rgba(255,153,51,1.00)", fill: "rgba(255,153,51,0.80)"},
218
+ invalidHover: {stroke: "rgba(255,0,0,1.00)", fill: "rgba(255,0,0,0.80)"}
219
+ },
220
+ {
221
+ valid: {stroke: "rgba(51,255,238,1.00)", fill: "rgba(51,255,238,0.40)"},
222
+ invalid: {stroke: "rgba(255,153,102,1.00)", fill: "rgba(255,153,102,0.40)"},
223
+ validSelected: {stroke: "rgba(51,255,238,1.00)", fill: "rgba(51,255,238,0.80)"},
224
+ invalidSelected: {stroke: "rgba(255,0,0,1.00)", fill: "rgba(255,0,0,0.80)"},
225
+ validHover: {stroke: "rgba(51,255,238,1.00)", fill: "rgba(51,255,238,0.80)"},
226
+ invalidHover: {stroke: "rgba(255,0,0,1.00)", fill: "rgba(255,0,0,0.80)"}
227
+ },
228
+ {
229
+ valid: {stroke: "rgba(255,221,51,1.00)", fill: "rgba(255,221,51,0.40)"},
230
+ invalid: {stroke: "rgba(255,153,102,1.00)", fill: "rgba(255,153,102,0.40)"},
231
+ validSelected: {stroke: "rgba(255,221,51,1.00)", fill: "rgba(255,221,51,0.80)"},
232
+ invalidSelected: {stroke: "rgba(255,0,0,1.00)", fill: "rgba(255,0,0,0.80)"},
233
+ validHover: {stroke: "rgba(255,221,51,1.00)", fill: "rgba(255,221,51,0.80)"},
234
+ invalidHover: {stroke: "rgba(255,0,0,1.00)", fill: "rgba(255,0,0,0.80)"}
235
+ }
236
+ ],
237
+ lineColor: {
238
+ 1: "rgba(102, 111, 255, 1 )",
239
+ 3: "rgba(102, 230, 255, 1)",
240
+ 5: "rgba(191, 255, 102, 1)",
241
+ 7: "rgba(255, 230, 102, 1)",
242
+ 9: "rgba(230, 102, 255, 1)"
243
+ },
244
+ attributeLineColor: [
245
+ "rgba(204, 204, 204, 1)",
246
+ "rgba(153, 51, 255, 1)",
247
+ "rgba(51, 254, 51, 1)",
248
+ "rgba(255, 51, 255, 1)",
249
+ "rgba(204, 255, 51, 1)",
250
+ "rgba(51, 153, 255, 1)",
251
+ "rgba(255, 153, 51, 1)",
252
+ "rgba(51, 255, 238, 1)",
253
+ "rgba(255, 221, 51, 1)"
254
+ ],
255
+ color: 1,
256
+ width: 2,
257
+ opacity: 9
258
+ };
259
+
260
+ export { getConfig, styleDefaultConfig };
@@ -0,0 +1,36 @@
1
+ var EKeyCode;
2
+ (function(EKeyCode2) {
3
+ EKeyCode2[EKeyCode2["A"] = 65] = "A";
4
+ EKeyCode2[EKeyCode2["B"] = 66] = "B";
5
+ EKeyCode2[EKeyCode2["C"] = 67] = "C";
6
+ EKeyCode2[EKeyCode2["D"] = 68] = "D";
7
+ EKeyCode2[EKeyCode2["E"] = 69] = "E";
8
+ EKeyCode2[EKeyCode2["F"] = 70] = "F";
9
+ EKeyCode2[EKeyCode2["G"] = 71] = "G";
10
+ EKeyCode2[EKeyCode2["H"] = 72] = "H";
11
+ EKeyCode2[EKeyCode2["L"] = 76] = "L";
12
+ EKeyCode2[EKeyCode2["R"] = 82] = "R";
13
+ EKeyCode2[EKeyCode2["Z"] = 90] = "Z";
14
+ EKeyCode2[EKeyCode2["W"] = 87] = "W";
15
+ EKeyCode2[EKeyCode2["X"] = 88] = "X";
16
+ EKeyCode2[EKeyCode2["Y"] = 89] = "Y";
17
+ EKeyCode2[EKeyCode2["S"] = 83] = "S";
18
+ EKeyCode2[EKeyCode2["Q"] = 81] = "Q";
19
+ EKeyCode2[EKeyCode2["Delete"] = 46] = "Delete";
20
+ EKeyCode2[EKeyCode2["F11"] = 122] = "F11";
21
+ EKeyCode2[EKeyCode2["Space"] = 32] = "Space";
22
+ EKeyCode2[EKeyCode2["Esc"] = 27] = "Esc";
23
+ EKeyCode2[EKeyCode2["Left"] = 37] = "Left";
24
+ EKeyCode2[EKeyCode2["Up"] = 38] = "Up";
25
+ EKeyCode2[EKeyCode2["Right"] = 39] = "Right";
26
+ EKeyCode2[EKeyCode2["Down"] = 40] = "Down";
27
+ EKeyCode2[EKeyCode2["Enter"] = 13] = "Enter";
28
+ EKeyCode2[EKeyCode2["Ctrl"] = 17] = "Ctrl";
29
+ EKeyCode2[EKeyCode2["Alt"] = 18] = "Alt";
30
+ EKeyCode2[EKeyCode2["Shift"] = 16] = "Shift";
31
+ EKeyCode2[EKeyCode2["Tab"] = 9] = "Tab";
32
+ EKeyCode2[EKeyCode2["BackSpace"] = 8] = "BackSpace";
33
+ })(EKeyCode || (EKeyCode = {}));
34
+ var EKeyCode$1 = EKeyCode;
35
+
36
+ export { EKeyCode$1 as default };
@@ -0,0 +1,67 @@
1
+ import canvasEdit0 from '../assets/attributeIcon/icon_canvasEdit0.svg.js';
2
+ import canvasEdit1 from '../assets/attributeIcon/icon_canvasEdit1.svg.js';
3
+ import canvasEdit2 from '../assets/attributeIcon/icon_canvasEdit2.svg.js';
4
+ import canvasEdit3 from '../assets/attributeIcon/icon_canvasEdit3.svg.js';
5
+ import canvasEdit4 from '../assets/attributeIcon/icon_canvasEdit4.svg.js';
6
+ import canvasEdit5 from '../assets/attributeIcon/icon_canvasEdit5.svg.js';
7
+ import canvasEdit6 from '../assets/attributeIcon/icon_canvasEdit6.svg.js';
8
+ import canvasEdit7 from '../assets/attributeIcon/icon_canvasEdit7.svg.js';
9
+ import canvasEdit8 from '../assets/attributeIcon/icon_canvasEdit8.svg.js';
10
+ import baseEditLan from '../assets/attributeIcon/icon_editLAN.svg.js';
11
+ import baseEditQing from '../assets/attributeIcon/icon_editQING.svg.js';
12
+ import baseEditLv from '../assets/attributeIcon/icon_editLV.svg.js';
13
+ import baseEditHuang from '../assets/attributeIcon/icon_editHUANG.svg.js';
14
+ import baseEditFen from '../assets/attributeIcon/icon_editFEN.svg.js';
15
+ import { EFilterToolOperation } from './tool.js';
16
+ export { default as INVALID_ICON } from '../assets/attributeIcon/icon_canvasEdit_miss.svg.js';
17
+
18
+ const NULL_ICON = canvasEdit0;
19
+ const HEADER_HEIGHT = 61;
20
+ const TAB_HEIGHT = 80;
21
+ const SEARCH_HEIGHT = 62;
22
+ const PADDING = 20;
23
+ const TABLE_ROW_HEIGHT = 55;
24
+ const PAGINATION_HEIGHT = 55;
25
+ const TIPS_HEIGHT = 40;
26
+ const FOOTER_HEIGHT = 80;
27
+ const SIDERBAR_WIDTH = 240;
28
+ const EDIT_STEP_WIDTH = 320;
29
+ const THEME_COLOR = "rgba(102, 111, 255, 1)";
30
+ const COLORS_ARRAY = [
31
+ "rgba(128, 12, 249, 1)",
32
+ "rgba(0, 255, 48, 1)",
33
+ "rgba(255, 136, 247, 1)",
34
+ "rgba(255, 226, 50, 1)",
35
+ "rgba(153, 66, 23, 1)",
36
+ "rgba(2, 130, 250, 1)",
37
+ "rgba(255, 35, 35, 1)",
38
+ "rgba(0, 255, 234, 1)"
39
+ ];
40
+ const ICON_ARRAY = [
41
+ canvasEdit0,
42
+ canvasEdit6,
43
+ canvasEdit3,
44
+ canvasEdit7,
45
+ canvasEdit2,
46
+ canvasEdit8,
47
+ canvasEdit5,
48
+ canvasEdit1,
49
+ canvasEdit4
50
+ ];
51
+ const BASE_ICON = {
52
+ 1: baseEditLan,
53
+ 3: baseEditQing,
54
+ 5: baseEditLv,
55
+ 7: baseEditHuang,
56
+ 9: baseEditFen
57
+ };
58
+ const INVALID_COLOR = "rgba(255, 51, 51, 1)";
59
+ const NULL_COLOR = "rgba(204, 204, 204, 1)";
60
+ const FILTER_TOOL_COLOR = {
61
+ [EFilterToolOperation.lc]: "rgba(153, 51, 255, 1)",
62
+ [EFilterToolOperation.rc]: "rgba(51, 153, 255, 1)",
63
+ [EFilterToolOperation.clc]: "rgba(46, 230, 46, 1)",
64
+ [EFilterToolOperation.crc]: "rgba(255, 51, 51, 1)"
65
+ };
66
+
67
+ export { BASE_ICON, COLORS_ARRAY, EDIT_STEP_WIDTH, FILTER_TOOL_COLOR, FOOTER_HEIGHT, HEADER_HEIGHT, ICON_ARRAY, INVALID_COLOR, NULL_COLOR, NULL_ICON, PADDING, PAGINATION_HEIGHT, SEARCH_HEIGHT, SIDERBAR_WIDTH, TABLE_ROW_HEIGHT, TAB_HEIGHT, THEME_COLOR, TIPS_HEIGHT };
@@ -0,0 +1,183 @@
1
+ const editStepWidth = 320;
2
+ var EPointCloudName;
3
+ (function(EPointCloudName2) {
4
+ EPointCloudName2["PointCloud"] = "pointCloudTool";
5
+ })(EPointCloudName || (EPointCloudName = {}));
6
+ var EVideoToolName;
7
+ (function(EVideoToolName2) {
8
+ EVideoToolName2["VideoTextTool"] = "videoTextTool";
9
+ EVideoToolName2["VideoTagTool"] = "videoTagTool";
10
+ EVideoToolName2["VideoClipTool"] = "videoClipTool";
11
+ })(EVideoToolName || (EVideoToolName = {}));
12
+ var EToolType;
13
+ (function(EToolType2) {
14
+ EToolType2[EToolType2["Rect"] = 0] = "Rect";
15
+ EToolType2[EToolType2["Tag"] = 1] = "Tag";
16
+ })(EToolType || (EToolType = {}));
17
+ var EToolName;
18
+ (function(EToolName2) {
19
+ EToolName2["Rect"] = "rectTool";
20
+ EToolName2["Tag"] = "tagTool";
21
+ EToolName2["Point"] = "pointTool";
22
+ EToolName2["PointMarker"] = "pointMarkerTool";
23
+ EToolName2["Segmentation"] = "segmentationTool";
24
+ EToolName2["Filter"] = "filterTool";
25
+ EToolName2["Text"] = "textTool";
26
+ EToolName2["Polygon"] = "polygonTool";
27
+ EToolName2["Line"] = "lineTool";
28
+ EToolName2["LineMarker"] = "lineMarkerTool";
29
+ EToolName2["Empty"] = "emptyTool";
30
+ EToolName2["FolderTag"] = "folderTagTool";
31
+ EToolName2["RectTrack"] = "rectTrackTool";
32
+ EToolName2["Face"] = "faceTool";
33
+ EToolName2["ClientAttribute"] = "clientAttributeTool";
34
+ EToolName2["OCRRelation"] = "OCRRelationTool";
35
+ EToolName2["SegmentByRect"] = "segmentByRectTool";
36
+ })(EToolName || (EToolName = {}));
37
+ var ECheckModel;
38
+ (function(ECheckModel2) {
39
+ ECheckModel2["Check"] = "check";
40
+ })(ECheckModel || (ECheckModel = {}));
41
+ var ERectPattern;
42
+ (function(ERectPattern2) {
43
+ ERectPattern2[ERectPattern2["nothing"] = 0] = "nothing";
44
+ ERectPattern2[ERectPattern2["RectBG"] = 1] = "RectBG";
45
+ ERectPattern2[ERectPattern2["showOrder"] = 2] = "showOrder";
46
+ })(ERectPattern || (ERectPattern = {}));
47
+ const TOOL_NAME = {
48
+ [EToolName.Rect]: "\u62C9\u6846",
49
+ [EToolName.Tag]: "\u6807\u7B7E",
50
+ [EToolName.Point]: "\u6807\u70B9",
51
+ [EToolName.PointMarker]: "\u5217\u8868\u6807\u70B9",
52
+ [EToolName.Segmentation]: "\u524D\u666F\u5206\u5272",
53
+ [EToolName.Filter]: "\u7B5B\u9009",
54
+ [EToolName.Text]: "\u6587\u672C",
55
+ [EToolName.Polygon]: "\u591A\u8FB9\u5F62",
56
+ [EToolName.Line]: "\u7EBF\u6761",
57
+ [EToolName.LineMarker]: "\u5217\u8868\u7EBF\u6761",
58
+ [EToolName.FolderTag]: "\u6587\u4EF6\u5939\u6807\u7B7E",
59
+ [EToolName.RectTrack]: "\u62C9\u6846\u8DDF\u8E2A",
60
+ [EToolName.Face]: "\u4EBA\u8138106\u5DE5\u5177",
61
+ [EToolName.ClientAttribute]: "\u5BA2\u6237\u7AEF\u5C5E\u6027\u5DE5\u5177",
62
+ [EToolName.OCRRelation]: "OCR\u5173\u8054\u5173\u7CFB\u5DE5\u5177",
63
+ [EToolName.SegmentByRect]: "\u7B97\u6CD5\u5206\u5272\u8F85\u52A9\u5DE5\u5177",
64
+ [EVideoToolName.VideoTextTool]: "\u89C6\u9891\u6587\u672C",
65
+ [EVideoToolName.VideoTagTool]: "\u89C6\u9891\u6807\u7B7E",
66
+ [EVideoToolName.VideoClipTool]: "\u89C6\u9891\u622A\u53D6",
67
+ [EPointCloudName.PointCloud]: "\u70B9\u4E91"
68
+ };
69
+ var EDependPattern;
70
+ (function(EDependPattern2) {
71
+ EDependPattern2[EDependPattern2["noDepend"] = 1] = "noDepend";
72
+ EDependPattern2[EDependPattern2["dependOrigin"] = 2] = "dependOrigin";
73
+ EDependPattern2[EDependPattern2["dependShape"] = 3] = "dependShape";
74
+ EDependPattern2[EDependPattern2["dependLine"] = 4] = "dependLine";
75
+ EDependPattern2[EDependPattern2["dependPolygon"] = 5] = "dependPolygon";
76
+ EDependPattern2[EDependPattern2["dependPreShape"] = 101] = "dependPreShape";
77
+ EDependPattern2[EDependPattern2["dependPreLine"] = 102] = "dependPreLine";
78
+ EDependPattern2[EDependPattern2["dependPrePolygon"] = 103] = "dependPrePolygon";
79
+ })(EDependPattern || (EDependPattern = {}));
80
+ var EFilterToolOperation;
81
+ (function(EFilterToolOperation2) {
82
+ EFilterToolOperation2["lc"] = "leftClick";
83
+ EFilterToolOperation2["rc"] = "rightClick";
84
+ EFilterToolOperation2["clc"] = "ctrlLeftClick";
85
+ EFilterToolOperation2["crc"] = "ctrlRightClick";
86
+ })(EFilterToolOperation || (EFilterToolOperation = {}));
87
+ const OPERATION_LIST = {
88
+ leftClick: "\u9F20\u6807\u5DE6\u952E",
89
+ rightClick: "\u9F20\u6807\u53F3\u952E",
90
+ ctrlLeftClick: "ctrl + \u9F20\u6807\u5DE6\u952E",
91
+ ctrlRightClick: "ctrl + \u9F20\u6807\u53F3\u952E"
92
+ };
93
+ var EAnnotationMode;
94
+ (function(EAnnotationMode2) {
95
+ EAnnotationMode2[EAnnotationMode2["Normal"] = 1] = "Normal";
96
+ EAnnotationMode2[EAnnotationMode2["Modify"] = 2] = "Modify";
97
+ })(EAnnotationMode || (EAnnotationMode = {}));
98
+ var ELineTypes;
99
+ (function(ELineTypes2) {
100
+ ELineTypes2[ELineTypes2["Line"] = 0] = "Line";
101
+ ELineTypes2[ELineTypes2["Curve"] = 1] = "Curve";
102
+ })(ELineTypes || (ELineTypes = {}));
103
+ var ELineColor;
104
+ (function(ELineColor2) {
105
+ ELineColor2[ELineColor2["SingleColor"] = 0] = "SingleColor";
106
+ ELineColor2[ELineColor2["MultiColor"] = 1] = "MultiColor";
107
+ })(ELineColor || (ELineColor = {}));
108
+ var ESelectedType;
109
+ (function(ESelectedType2) {
110
+ ESelectedType2[ESelectedType2["Form"] = 1] = "Form";
111
+ ESelectedType2[ESelectedType2["Json"] = 2] = "Json";
112
+ })(ESelectedType || (ESelectedType = {}));
113
+ var EDragTarget;
114
+ (function(EDragTarget2) {
115
+ EDragTarget2[EDragTarget2["Point"] = 0] = "Point";
116
+ EDragTarget2[EDragTarget2["Line"] = 1] = "Line";
117
+ EDragTarget2[EDragTarget2["Plane"] = 2] = "Plane";
118
+ })(EDragTarget || (EDragTarget = {}));
119
+ var EDrawPointPattern;
120
+ (function(EDrawPointPattern2) {
121
+ EDrawPointPattern2[EDrawPointPattern2["None"] = 0] = "None";
122
+ EDrawPointPattern2[EDrawPointPattern2["Drawing"] = 1] = "Drawing";
123
+ EDrawPointPattern2[EDrawPointPattern2["Edit"] = 2] = "Edit";
124
+ })(EDrawPointPattern || (EDrawPointPattern = {}));
125
+ var EPageOperator;
126
+ (function(EPageOperator2) {
127
+ EPageOperator2[EPageOperator2["Backward"] = 0] = "Backward";
128
+ EPageOperator2[EPageOperator2["Forward"] = 1] = "Forward";
129
+ EPageOperator2[EPageOperator2["JumpSkip"] = 2] = "JumpSkip";
130
+ EPageOperator2[EPageOperator2["None"] = 3] = "None";
131
+ })(EPageOperator || (EPageOperator = {}));
132
+ var EAuditStatus;
133
+ (function(EAuditStatus2) {
134
+ EAuditStatus2[EAuditStatus2["Wait"] = 0] = "Wait";
135
+ EAuditStatus2[EAuditStatus2["Pass"] = 1] = "Pass";
136
+ EAuditStatus2[EAuditStatus2["Fail"] = 2] = "Fail";
137
+ EAuditStatus2[EAuditStatus2["Loading"] = 3] = "Loading";
138
+ })(EAuditStatus || (EAuditStatus = {}));
139
+ var ETextType;
140
+ (function(ETextType2) {
141
+ ETextType2[ETextType2["AnyString"] = 0] = "AnyString";
142
+ ETextType2[ETextType2["Order"] = 1] = "Order";
143
+ ETextType2[ETextType2["EnglishOnly"] = 2] = "EnglishOnly";
144
+ ETextType2[ETextType2["NumberOnly"] = 3] = "NumberOnly";
145
+ ETextType2[ETextType2["CustomFormat"] = 4] = "CustomFormat";
146
+ })(ETextType || (ETextType = {}));
147
+ const TEXT_TYPE = {
148
+ 0: "\u4EFB\u610F\u5B57\u7B26",
149
+ 1: "\u5E8F\u53F7",
150
+ 2: "\u4EC5\u82F1\u6587",
151
+ 3: "\u4EC5\u6570\u5B57"
152
+ };
153
+ const TEXT_ATTRIBUTE_MAX_LENGTH = 1e3;
154
+ const TEXT_ATTRIBUTE_LINE_HEIGHT = 16;
155
+ const DEFAULT_TEXT_MAX_WIDTH = 300;
156
+ const DEFAULT_FONT = "normal normal 500 14px Arial";
157
+ var EThumbnailOption;
158
+ (function(EThumbnailOption2) {
159
+ EThumbnailOption2[EThumbnailOption2["ImgList"] = 1e3] = "ImgList";
160
+ EThumbnailOption2[EThumbnailOption2["TrackPrediction"] = 1001] = "TrackPrediction";
161
+ EThumbnailOption2[EThumbnailOption2["ImgSearch"] = 1002] = "ImgSearch";
162
+ })(EThumbnailOption || (EThumbnailOption = {}));
163
+ const CLIENT_TOOL_HEAD_TYPE = {
164
+ [EPointCloudName.PointCloud]: "sensebeepc",
165
+ [EToolName.ClientAttribute]: "sensebeepc-EnumAttributeTool",
166
+ [EToolName.Face]: "sensebeepc-FacePointsLabellingTool",
167
+ [EToolName.OCRRelation]: "sensebeepc-OCRRelationTool"
168
+ };
169
+ const CLIENT_TOOL_NAME = {
170
+ [EPointCloudName.PointCloud]: "\u70B9\u4E91\u5BA2\u6237\u7AEF",
171
+ [EToolName.ClientAttribute]: "\u5BA2\u6237\u7AEF\u5C5E\u6027\u5DE5\u5177",
172
+ [EToolName.Face]: "\u4EBA\u8138106\u70B9\u5DE5\u5177",
173
+ [EToolName.OCRRelation]: "OCR\u5173\u8054\u5173\u7CFB\u5DE5\u5177"
174
+ };
175
+ const SEGMENT_NUMBER = 16;
176
+ const edgeAdsorptionScope = 10;
177
+ var EPolygonPattern;
178
+ (function(EPolygonPattern2) {
179
+ EPolygonPattern2[EPolygonPattern2["Normal"] = 0] = "Normal";
180
+ EPolygonPattern2[EPolygonPattern2["Rect"] = 1] = "Rect";
181
+ })(EPolygonPattern || (EPolygonPattern = {}));
182
+
183
+ export { CLIENT_TOOL_HEAD_TYPE, CLIENT_TOOL_NAME, DEFAULT_FONT, DEFAULT_TEXT_MAX_WIDTH, EAnnotationMode, EAuditStatus, ECheckModel, EDependPattern, EDragTarget, EDrawPointPattern, EFilterToolOperation, ELineColor, ELineTypes, EPageOperator, EPointCloudName, EPolygonPattern, ERectPattern, ESelectedType, ETextType, EThumbnailOption, EToolName, EToolType, EVideoToolName, OPERATION_LIST, SEGMENT_NUMBER, TEXT_ATTRIBUTE_LINE_HEIGHT, TEXT_ATTRIBUTE_MAX_LENGTH, TEXT_TYPE, TOOL_NAME, edgeAdsorptionScope, editStepWidth };