@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,10 +1,110 @@
|
|
|
1
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var annotation = require('../../constant/annotation.js');
|
|
4
|
+
var icon_cuboidFAB = require('../../assets/attributeIcon/icon_cuboidFAB.svg.js');
|
|
5
|
+
var icon_cuboidMore = require('../../assets/attributeIcon/icon_cuboidMore.svg.js');
|
|
6
|
+
var icon_cuboidRight = require('../../assets/attributeIcon/icon_cuboidRight.svg.js');
|
|
7
|
+
var icon_cuboidLeft = require('../../assets/attributeIcon/icon_cuboidLeft.svg.js');
|
|
8
|
+
var icon_cuboidTop = require('../../assets/attributeIcon/icon_cuboidTop.svg.js');
|
|
9
|
+
|
|
10
|
+
const MORE_ICON_LISTS = [
|
|
11
|
+
{
|
|
12
|
+
icon: icon_cuboidRight,
|
|
13
|
+
id: "cuboidRight"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
icon: icon_cuboidLeft,
|
|
17
|
+
id: "cuboidLeft"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
icon: icon_cuboidTop,
|
|
21
|
+
id: "cuboidTop"
|
|
22
|
+
}
|
|
23
|
+
];
|
|
24
|
+
class CuboidToggleButtonClass {
|
|
25
|
+
constructor(props) {
|
|
26
|
+
const {container, cuboidButtonMove, toggleDirection} = props;
|
|
27
|
+
this.container = container;
|
|
28
|
+
this.direction = annotation.ECuboidDirection.Front;
|
|
29
|
+
this.isFrontSide = true;
|
|
30
|
+
this.cuboidButtonMove = cuboidButtonMove;
|
|
31
|
+
this.onToggleDirection = toggleDirection;
|
|
32
|
+
this._cuboidButtonDOM = this.initCuboidButtonDOM();
|
|
33
|
+
this._cuboidFABDOM = this.initcuboidFABDOM(icon_cuboidFAB);
|
|
34
|
+
this._cuboidMoreDOM = this.initcuboidMoreDOM(icon_cuboidMore);
|
|
35
|
+
this._cuboidMoreListDOM = this.initcuboidMoreListDOM();
|
|
36
|
+
this.appendToContainer();
|
|
37
|
+
}
|
|
38
|
+
appendToContainer() {
|
|
39
|
+
if (!this._cuboidButtonDOM || !this._cuboidFABDOM || !this._cuboidMoreDOM) {
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
this.container.appendChild(this._cuboidButtonDOM);
|
|
43
|
+
this._cuboidButtonDOM.appendChild(this._cuboidFABDOM);
|
|
44
|
+
this._cuboidButtonDOM.appendChild(this._cuboidMoreDOM);
|
|
45
|
+
}
|
|
46
|
+
initCuboidButtonDOM() {
|
|
47
|
+
const _cuboidButtonDOM = document.createElement("div");
|
|
48
|
+
_cuboidButtonDOM.setAttribute("id", "LABELBEE_CUBOID_BUTTON_BOX");
|
|
49
|
+
_cuboidButtonDOM.setAttribute("style", `
|
|
2
50
|
width: 40px;
|
|
3
51
|
height: 74px;
|
|
4
52
|
border-radius: 10px;
|
|
5
53
|
background-color: #FFFFFF;
|
|
6
54
|
z-index: 10;
|
|
7
|
-
`)
|
|
55
|
+
`);
|
|
56
|
+
_cuboidButtonDOM.addEventListener("mouseover", (e) => {
|
|
57
|
+
e.stopPropagation();
|
|
58
|
+
setTimeout(() => {
|
|
59
|
+
this.cuboidButtonMove("in");
|
|
60
|
+
}, 100);
|
|
61
|
+
});
|
|
62
|
+
_cuboidButtonDOM.addEventListener("mouseleave", (e) => {
|
|
63
|
+
e.stopPropagation();
|
|
64
|
+
setTimeout(() => {
|
|
65
|
+
this.cuboidButtonMove("out");
|
|
66
|
+
}, 100);
|
|
67
|
+
});
|
|
68
|
+
return _cuboidButtonDOM;
|
|
69
|
+
}
|
|
70
|
+
initcuboidFABDOM(icon) {
|
|
71
|
+
const _cuboidFAB = document.createElement("div");
|
|
72
|
+
_cuboidFAB.setAttribute("id", "CUBOID_FORWARD_AND_BACK_SWITCH");
|
|
73
|
+
_cuboidFAB.innerHTML = icon;
|
|
74
|
+
_cuboidFAB.addEventListener("mouseup", (e) => {
|
|
75
|
+
e.stopPropagation();
|
|
76
|
+
this.isFrontSide = !this.isFrontSide;
|
|
77
|
+
this.direction = this.isFrontSide ? annotation.ECuboidDirection.Front : annotation.ECuboidDirection.Back;
|
|
78
|
+
this.onToggleDirection(this.direction);
|
|
79
|
+
});
|
|
80
|
+
return _cuboidFAB;
|
|
81
|
+
}
|
|
82
|
+
initcuboidMoreDOM(icon) {
|
|
83
|
+
const _iconDOM = document.createElement("div");
|
|
84
|
+
_iconDOM.setAttribute("id", "CUBOID_MORE_ICON");
|
|
85
|
+
_iconDOM.innerHTML = icon;
|
|
86
|
+
_iconDOM.addEventListener("mouseup", (e) => {
|
|
87
|
+
if (this._cuboidButtonDOM && this._cuboidMoreListDOM) {
|
|
88
|
+
if (this._cuboidButtonDOM.contains(this._cuboidMoreListDOM)) {
|
|
89
|
+
this.clearCuboidMoreListDOM();
|
|
90
|
+
} else {
|
|
91
|
+
this._cuboidButtonDOM.appendChild(this._cuboidMoreListDOM);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
e.stopPropagation();
|
|
95
|
+
});
|
|
96
|
+
_iconDOM.addEventListener("mousedown", (e) => {
|
|
97
|
+
e.stopPropagation();
|
|
98
|
+
});
|
|
99
|
+
_iconDOM.addEventListener("contextmenu", (e) => {
|
|
100
|
+
e.stopPropagation();
|
|
101
|
+
});
|
|
102
|
+
return _iconDOM;
|
|
103
|
+
}
|
|
104
|
+
initcuboidMoreListDOM() {
|
|
105
|
+
const cuboidMoreListDOM = document.createElement("div");
|
|
106
|
+
cuboidMoreListDOM.setAttribute("id", "CUBOID_MORE_LIST_ICON");
|
|
107
|
+
cuboidMoreListDOM.setAttribute("style", `
|
|
8
108
|
height: 36px;
|
|
9
109
|
border-radius: 10px;
|
|
10
110
|
background-color: #FFFFFF;
|
|
@@ -14,12 +114,43 @@
|
|
|
14
114
|
bottom: 0px;
|
|
15
115
|
left: 44px;
|
|
16
116
|
display: flex;
|
|
17
|
-
`);
|
|
117
|
+
`);
|
|
118
|
+
let str = "";
|
|
119
|
+
const iconStyle = `margin-left:4px;margin-right:4px;display:flex;align-items:center;`;
|
|
120
|
+
MORE_ICON_LISTS.forEach((i, index) => {
|
|
121
|
+
const lastIconStyle = index === MORE_ICON_LISTS.length - 1 ? "margin-left:0px;margin-right:0px;" : "";
|
|
122
|
+
str += `<span id=${i.id} key=${index} style=${iconStyle}${lastIconStyle}>${i.icon}</span>`;
|
|
123
|
+
});
|
|
124
|
+
cuboidMoreListDOM.innerHTML = str;
|
|
125
|
+
cuboidMoreListDOM.childNodes.forEach((item) => {
|
|
126
|
+
item.addEventListener("click", (e) => {
|
|
127
|
+
e.stopPropagation();
|
|
128
|
+
switch (item == null ? void 0 : item.id) {
|
|
129
|
+
case "cuboidLeft":
|
|
130
|
+
this.onToggleDirection(annotation.ECuboidDirection.Left);
|
|
131
|
+
break;
|
|
132
|
+
case "cuboidRight":
|
|
133
|
+
this.onToggleDirection(annotation.ECuboidDirection.Right);
|
|
134
|
+
break;
|
|
135
|
+
case "cuboidTop":
|
|
136
|
+
this.onToggleDirection(annotation.ECuboidDirection.Top);
|
|
137
|
+
break;
|
|
138
|
+
}
|
|
139
|
+
this.clearCuboidMoreListDOM();
|
|
140
|
+
this.cuboidButtonMove("out");
|
|
141
|
+
});
|
|
142
|
+
});
|
|
143
|
+
return cuboidMoreListDOM;
|
|
144
|
+
}
|
|
145
|
+
update(position) {
|
|
146
|
+
var _a;
|
|
147
|
+
const {left, top, color} = position;
|
|
148
|
+
(_a = this._cuboidButtonDOM) == null ? void 0 : _a.setAttribute("style", `
|
|
18
149
|
position: absolute;
|
|
19
150
|
font-size: 14px;
|
|
20
|
-
left:${
|
|
21
|
-
top: ${
|
|
22
|
-
color: ${
|
|
151
|
+
left:${left}px;
|
|
152
|
+
top: ${top}px;
|
|
153
|
+
color: ${color};
|
|
23
154
|
width: 41px;
|
|
24
155
|
height: 74px;
|
|
25
156
|
border-radius: 10px;
|
|
@@ -28,4 +159,18 @@
|
|
|
28
159
|
text-align: center;
|
|
29
160
|
padding-top: 10px;
|
|
30
161
|
z-index: 10;
|
|
31
|
-
`)
|
|
162
|
+
`);
|
|
163
|
+
}
|
|
164
|
+
clearCuboidButtonDOM() {
|
|
165
|
+
if (this._cuboidButtonDOM && this.container.contains(this._cuboidButtonDOM)) {
|
|
166
|
+
this.container.removeChild(this._cuboidButtonDOM);
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
clearCuboidMoreListDOM() {
|
|
170
|
+
if (this._cuboidButtonDOM && this._cuboidMoreListDOM && this._cuboidButtonDOM.contains(this._cuboidMoreListDOM)) {
|
|
171
|
+
this._cuboidButtonDOM.removeChild(this._cuboidMoreListDOM);
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
module.exports = CuboidToggleButtonClass;
|
|
@@ -1 +1,37 @@
|
|
|
1
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
class EventListener {
|
|
4
|
+
constructor() {
|
|
5
|
+
this._events = new Map();
|
|
6
|
+
}
|
|
7
|
+
on(eventName, callback) {
|
|
8
|
+
const existEvents = this._events.get(eventName) || [];
|
|
9
|
+
if (!existEvents.some((fn) => fn === callback)) {
|
|
10
|
+
this._events.set(eventName, existEvents.concat(callback));
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
singleOn(eventName, callback) {
|
|
14
|
+
this._events.set(eventName, [callback]);
|
|
15
|
+
}
|
|
16
|
+
emit(eventName, ...args) {
|
|
17
|
+
const listener = this._events.get(eventName);
|
|
18
|
+
if (listener) {
|
|
19
|
+
listener.forEach((fn) => {
|
|
20
|
+
if (fn) {
|
|
21
|
+
fn(...args);
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
unbind(eventName, callback) {
|
|
27
|
+
const existEvents = this._events.get(eventName);
|
|
28
|
+
if (existEvents) {
|
|
29
|
+
this._events.set(eventName, existEvents.filter((fn) => fn !== callback));
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
unbindAll(eventName) {
|
|
33
|
+
this._events.delete(eventName);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
module.exports = EventListener;
|
|
@@ -1 +1,41 @@
|
|
|
1
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var rectOperation = require('./rectOperation.js');
|
|
4
|
+
|
|
5
|
+
var __defProp = Object.defineProperty;
|
|
6
|
+
var __defProps = Object.defineProperties;
|
|
7
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
8
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
9
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
11
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, {enumerable: true, configurable: true, writable: true, value}) : obj[key] = value;
|
|
12
|
+
var __spreadValues = (a, b) => {
|
|
13
|
+
for (var prop in b || (b = {}))
|
|
14
|
+
if (__hasOwnProp.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
if (__getOwnPropSymbols)
|
|
17
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
18
|
+
if (__propIsEnum.call(b, prop))
|
|
19
|
+
__defNormalProp(a, prop, b[prop]);
|
|
20
|
+
}
|
|
21
|
+
return a;
|
|
22
|
+
};
|
|
23
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
24
|
+
const config = {
|
|
25
|
+
textConfigurable: false,
|
|
26
|
+
attributeConfigurable: true,
|
|
27
|
+
attributeList: []
|
|
28
|
+
};
|
|
29
|
+
class MeasureOperation extends rectOperation.RectOperation {
|
|
30
|
+
constructor(props) {
|
|
31
|
+
super(__spreadProps(__spreadValues({}, props), {config: JSON.stringify(config)}));
|
|
32
|
+
}
|
|
33
|
+
setSelectedIdAfterAddingDrawingRect() {
|
|
34
|
+
if (!this.drawingRect) {
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
this.setSelectedRectID(this.drawingRect.id);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
module.exports = MeasureOperation;
|
|
@@ -1 +1,365 @@
|
|
|
1
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var lbUtils = require('@labelbee/lb-utils');
|
|
4
|
+
var annotation = require('../../constant/annotation.js');
|
|
5
|
+
var tool = require('../../constant/tool.js');
|
|
6
|
+
var AxisUtils = require('../../utils/tool/AxisUtils.js');
|
|
7
|
+
var CommonToolUtils = require('../../utils/tool/CommonToolUtils.js');
|
|
8
|
+
var DrawUtils = require('../../utils/tool/DrawUtils.js');
|
|
9
|
+
var PolygonUtils = require('../../utils/tool/PolygonUtils.js');
|
|
10
|
+
var defaultConfig = require('../../constant/defaultConfig.js');
|
|
11
|
+
var _ = require('lodash');
|
|
12
|
+
var polygonOperation = require('./polygonOperation.js');
|
|
13
|
+
var basicToolOperation = require('./basicToolOperation.js');
|
|
14
|
+
|
|
15
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
16
|
+
|
|
17
|
+
var ___default = /*#__PURE__*/_interopDefaultLegacy(_);
|
|
18
|
+
|
|
19
|
+
var __defProp = Object.defineProperty;
|
|
20
|
+
var __defProps = Object.defineProperties;
|
|
21
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
22
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
23
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
24
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
25
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, {enumerable: true, configurable: true, writable: true, value}) : obj[key] = value;
|
|
26
|
+
var __spreadValues = (a, b) => {
|
|
27
|
+
for (var prop in b || (b = {}))
|
|
28
|
+
if (__hasOwnProp.call(b, prop))
|
|
29
|
+
__defNormalProp(a, prop, b[prop]);
|
|
30
|
+
if (__getOwnPropSymbols)
|
|
31
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
32
|
+
if (__propIsEnum.call(b, prop))
|
|
33
|
+
__defNormalProp(a, prop, b[prop]);
|
|
34
|
+
}
|
|
35
|
+
return a;
|
|
36
|
+
};
|
|
37
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
38
|
+
class PointCloud2dOperation extends polygonOperation {
|
|
39
|
+
constructor(props) {
|
|
40
|
+
super(props);
|
|
41
|
+
this.selectedIDs = [];
|
|
42
|
+
this.rightMouseUp = (e) => {
|
|
43
|
+
var _a;
|
|
44
|
+
if (this.drawingPointList.length > 0) {
|
|
45
|
+
this.addDrawingPointToPolygonList();
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
if (e.ctrlKey) {
|
|
49
|
+
this.emit("addSelectedIDs", this.hoverID);
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
this.emit("setSelectedIDs", this.hoverID);
|
|
53
|
+
const hoverAttribute = (_a = this.polygonList.find((v) => v.id === this.hoverID)) == null ? void 0 : _a.attribute;
|
|
54
|
+
if (hoverAttribute && hoverAttribute !== this.defaultAttribute) {
|
|
55
|
+
this.emit("syncAttribute", hoverAttribute);
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
this.onKeyDown = () => {
|
|
59
|
+
};
|
|
60
|
+
this.onKeyUp = () => {
|
|
61
|
+
};
|
|
62
|
+
this.renderSingleSelectedPolygon = (selectedPolygon) => {
|
|
63
|
+
var _a;
|
|
64
|
+
if (selectedPolygon) {
|
|
65
|
+
const color = this.getPointCloudLineColor(selectedPolygon);
|
|
66
|
+
const polygon = AxisUtils["default"].changePointListByZoom(selectedPolygon.pointList, this.zoom, this.currentPos);
|
|
67
|
+
DrawUtils.drawSelectedPolygonWithFillAndLine(this.canvas, polygon, {
|
|
68
|
+
fillColor: "transparent",
|
|
69
|
+
strokeColor: color,
|
|
70
|
+
pointColor: "white",
|
|
71
|
+
thickness: 2,
|
|
72
|
+
lineCap: "round",
|
|
73
|
+
isClose: true,
|
|
74
|
+
lineType: (_a = this.config) == null ? void 0 : _a.lineType
|
|
75
|
+
});
|
|
76
|
+
if (selectedPolygon.isRect === true && this.showDirectionLine === true) {
|
|
77
|
+
this.renderRectPolygonDirection(polygon);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
this.emitUpdatePolygonByDrag = () => {
|
|
82
|
+
if (this.dragInfo) {
|
|
83
|
+
const {originPolygonList} = this.dragInfo;
|
|
84
|
+
if (this.selectedIDs.length > 0) {
|
|
85
|
+
const emitUpdateList = [];
|
|
86
|
+
this.polygonList.forEach((polygon) => {
|
|
87
|
+
if (this.selectedIDs.includes(polygon.id)) {
|
|
88
|
+
const originPolygon = originPolygonList.find((i) => i.id === polygon.id);
|
|
89
|
+
if (originPolygon) {
|
|
90
|
+
emitUpdateList.push({newPolygon: polygon, originPolygon});
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
this.emit("updatePolygonByDrag", emitUpdateList);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
var _a, _b, _c, _d, _e, _f;
|
|
99
|
+
this.showDirectionLine = (_a = props.showDirectionLine) != null ? _a : true;
|
|
100
|
+
this.forbidAddNew = (_b = props.forbidAddNew) != null ? _b : false;
|
|
101
|
+
this.pointCloudConfig = (_c = CommonToolUtils.jsonParser(props.config)) != null ? _c : {};
|
|
102
|
+
this.hideAttributes = [];
|
|
103
|
+
this.checkMode = (_d = props.checkMode) != null ? _d : false;
|
|
104
|
+
if (this.forbidAddNew === false && props.checkMode === true) {
|
|
105
|
+
this.forbidAddNew = true;
|
|
106
|
+
}
|
|
107
|
+
this.config = __spreadProps(__spreadValues({}, defaultConfig.polygonConfig), {
|
|
108
|
+
textConfigurable: false,
|
|
109
|
+
attributeConfigurable: true,
|
|
110
|
+
attributeList: (_f = (_e = this.pointCloudConfig) == null ? void 0 : _e.attributeList) != null ? _f : []
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
get getSelectedIDs() {
|
|
114
|
+
return this.selectedIDs;
|
|
115
|
+
}
|
|
116
|
+
get enableDrag() {
|
|
117
|
+
return Boolean(this.selectedIDs.length > 0 && this.dragInfo);
|
|
118
|
+
}
|
|
119
|
+
get visiblePolygonList() {
|
|
120
|
+
return this.polygonList.filter((i) => !this.hideAttributes.includes(i.attribute));
|
|
121
|
+
}
|
|
122
|
+
setHiddenAttributes(hideAttributes) {
|
|
123
|
+
this.hideAttributes = hideAttributes;
|
|
124
|
+
}
|
|
125
|
+
setConfig(config) {
|
|
126
|
+
var _a;
|
|
127
|
+
const newConfig = CommonToolUtils.jsonParser(config);
|
|
128
|
+
this.pointCloudConfig = newConfig;
|
|
129
|
+
this.config = __spreadProps(__spreadValues({}, this.config), {
|
|
130
|
+
attributeList: (_a = newConfig == null ? void 0 : newConfig.attributeList) != null ? _a : []
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
dragMouseDown(e) {
|
|
134
|
+
if (this.checkMode) {
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
super.dragMouseDown(e);
|
|
138
|
+
}
|
|
139
|
+
deletePolygon(id) {
|
|
140
|
+
if (this.checkMode) {
|
|
141
|
+
return;
|
|
142
|
+
}
|
|
143
|
+
super.deletePolygon(id);
|
|
144
|
+
}
|
|
145
|
+
deletePolygonPoint(index) {
|
|
146
|
+
if (this.checkMode) {
|
|
147
|
+
return;
|
|
148
|
+
}
|
|
149
|
+
super.deletePolygonPoint(index);
|
|
150
|
+
}
|
|
151
|
+
setSelectedIDs(selectedIDs) {
|
|
152
|
+
this.selectedIDs = selectedIDs;
|
|
153
|
+
if (this.selectedIDs.length < 2) {
|
|
154
|
+
this.setSelectedID(this.selectedIDs.length === 1 ? this.selectedIDs[0] : "");
|
|
155
|
+
}
|
|
156
|
+
this.render();
|
|
157
|
+
}
|
|
158
|
+
deleteSelectedID() {
|
|
159
|
+
super.deleteSelectedID();
|
|
160
|
+
this.selectedIDs = [];
|
|
161
|
+
this.emit("deleteSelectedIDs");
|
|
162
|
+
}
|
|
163
|
+
get selectedPolygons() {
|
|
164
|
+
return PolygonUtils.getPolygonByIDs(this.polygonList, this.selectedIDs);
|
|
165
|
+
}
|
|
166
|
+
updateSelectedPolygonsPoints(offset) {
|
|
167
|
+
var _a, _b;
|
|
168
|
+
if (this.selectedPolygons && ((_a = this.selectedPolygons) == null ? void 0 : _a.length) > 0) {
|
|
169
|
+
const originPolygonList = ___default["default"].cloneDeep(this.selectedPolygons);
|
|
170
|
+
const updateList = [];
|
|
171
|
+
(_b = this.selectedPolygons) == null ? void 0 : _b.forEach((polygon, index) => {
|
|
172
|
+
polygon.pointList = polygon.pointList.map((point) => {
|
|
173
|
+
var _a2, _b2;
|
|
174
|
+
const {x, y} = point;
|
|
175
|
+
return __spreadProps(__spreadValues({}, point), {
|
|
176
|
+
x: x + ((_a2 = offset.x) != null ? _a2 : 0),
|
|
177
|
+
y: y + ((_b2 = offset.y) != null ? _b2 : 0)
|
|
178
|
+
});
|
|
179
|
+
});
|
|
180
|
+
updateList.push({originPolygon: originPolygonList[index], newPolygon: polygon});
|
|
181
|
+
});
|
|
182
|
+
this.emit("updateResult");
|
|
183
|
+
this.emit("updatePolygonByDrag", updateList);
|
|
184
|
+
this.render();
|
|
185
|
+
this.history.pushHistory(this.polygonList);
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
getLineColor() {
|
|
189
|
+
return "rgba(0, 255, 255, 0.5)";
|
|
190
|
+
}
|
|
191
|
+
getPointCloudLineColor(polygon) {
|
|
192
|
+
return polygon.valid === false ? lbUtils.INVALID_COLOR : lbUtils.toolStyleConverter.getColorFromConfig({attribute: polygon.attribute}, __spreadProps(__spreadValues({}, this.pointCloudConfig), {attributeConfigurable: true}), {}).stroke;
|
|
193
|
+
}
|
|
194
|
+
renderStaticPolygon() {
|
|
195
|
+
var _a;
|
|
196
|
+
if (this.isHidden === false) {
|
|
197
|
+
(_a = this.visiblePolygonList) == null ? void 0 : _a.forEach((polygon) => {
|
|
198
|
+
var _a2, _b, _c;
|
|
199
|
+
if ([...this.selectedIDs, this.editPolygonID].includes(polygon.id)) {
|
|
200
|
+
return;
|
|
201
|
+
}
|
|
202
|
+
const lineColor = this.getPointCloudLineColor(polygon);
|
|
203
|
+
const transformPointList = AxisUtils["default"].changePointListByZoom(polygon.pointList || [], this.zoom, this.currentPos);
|
|
204
|
+
DrawUtils.drawPolygonWithFillAndLine(this.canvas, transformPointList, {
|
|
205
|
+
fillColor: "transparent",
|
|
206
|
+
strokeColor: lineColor,
|
|
207
|
+
pointColor: "white",
|
|
208
|
+
thickness: (_b = (_a2 = this.style) == null ? void 0 : _a2.width) != null ? _b : 2,
|
|
209
|
+
lineCap: "round",
|
|
210
|
+
isClose: true,
|
|
211
|
+
lineType: (_c = this.config) == null ? void 0 : _c.lineType
|
|
212
|
+
});
|
|
213
|
+
if (polygon.isRect === true && this.showDirectionLine === true) {
|
|
214
|
+
this.renderRectPolygonDirection(transformPointList);
|
|
215
|
+
}
|
|
216
|
+
});
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
renderSelectedPolygon() {
|
|
220
|
+
var _a;
|
|
221
|
+
(_a = this.selectedPolygons) == null ? void 0 : _a.forEach((polygon) => {
|
|
222
|
+
this.renderSingleSelectedPolygon(polygon);
|
|
223
|
+
});
|
|
224
|
+
}
|
|
225
|
+
renderRectPolygonDirection(polygon) {
|
|
226
|
+
if (polygon.length < 2) {
|
|
227
|
+
return;
|
|
228
|
+
}
|
|
229
|
+
DrawUtils.drawLine(this.canvas, polygon[0], polygon[1], {
|
|
230
|
+
color: "white",
|
|
231
|
+
thickness: 3,
|
|
232
|
+
lineDash: [6]
|
|
233
|
+
});
|
|
234
|
+
}
|
|
235
|
+
get currentPolygonListByPattern() {
|
|
236
|
+
return this.polygonList.filter((v) => {
|
|
237
|
+
if (this.pattern === tool.EPolygonPattern.Rect) {
|
|
238
|
+
return v.isRect === true;
|
|
239
|
+
}
|
|
240
|
+
if (this.pattern === tool.EPolygonPattern.Normal) {
|
|
241
|
+
return v.isRect !== true;
|
|
242
|
+
}
|
|
243
|
+
return true;
|
|
244
|
+
});
|
|
245
|
+
}
|
|
246
|
+
getHoverID(e) {
|
|
247
|
+
var _a;
|
|
248
|
+
const coordinate = this.getCoordinateUnderZoom(e);
|
|
249
|
+
const currentPolygonList = this.currentPolygonListByPattern;
|
|
250
|
+
const polygonListWithZoom = currentPolygonList.map((polygon) => __spreadProps(__spreadValues({}, polygon), {
|
|
251
|
+
pointList: AxisUtils["default"].changePointListByZoom(polygon.pointList, this.zoom)
|
|
252
|
+
}));
|
|
253
|
+
return PolygonUtils.getHoverPolygonID(coordinate, polygonListWithZoom, 10, (_a = this.config) == null ? void 0 : _a.lineType);
|
|
254
|
+
}
|
|
255
|
+
switchToNextPolygon(sort = annotation.ESortDirection.ascend) {
|
|
256
|
+
if (this.drawingPointList.length > 0) {
|
|
257
|
+
return;
|
|
258
|
+
}
|
|
259
|
+
const sortList = this.currentPolygonListByPattern.map((v) => {
|
|
260
|
+
var _a, _b, _c, _d;
|
|
261
|
+
return __spreadProps(__spreadValues({}, v), {
|
|
262
|
+
x: (_b = (_a = v.pointList[0]) == null ? void 0 : _a.x) != null ? _b : 0,
|
|
263
|
+
y: (_d = (_c = v.pointList[0]) == null ? void 0 : _c.y) != null ? _d : 0
|
|
264
|
+
});
|
|
265
|
+
});
|
|
266
|
+
const nextSelectedResult = CommonToolUtils.getNextSelectedRectID(sortList, sort, this.selectedID);
|
|
267
|
+
if (nextSelectedResult) {
|
|
268
|
+
this.setSelectedIDs([nextSelectedResult.id]);
|
|
269
|
+
this.render();
|
|
270
|
+
return [nextSelectedResult.id];
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
setSelectedIdAfterAddingDrawing(newID) {
|
|
274
|
+
if (this.drawingPointList.length === 0) {
|
|
275
|
+
return;
|
|
276
|
+
}
|
|
277
|
+
this.setSelectedID(newID);
|
|
278
|
+
}
|
|
279
|
+
updateTextAttribute(newID) {
|
|
280
|
+
var _a, _b;
|
|
281
|
+
const oldID = this.selectedID;
|
|
282
|
+
if (newID !== oldID && oldID) {
|
|
283
|
+
(_a = this._textAttributInstance) == null ? void 0 : _a.changeSelected();
|
|
284
|
+
}
|
|
285
|
+
if (!newID) {
|
|
286
|
+
(_b = this._textAttributInstance) == null ? void 0 : _b.clearTextAttribute();
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
setSelectedID(newID) {
|
|
290
|
+
this.updateTextAttribute(newID);
|
|
291
|
+
this.selectedID = newID;
|
|
292
|
+
this.render();
|
|
293
|
+
}
|
|
294
|
+
addPointInDrawing(e) {
|
|
295
|
+
if (this.forbidAddNew) {
|
|
296
|
+
return;
|
|
297
|
+
}
|
|
298
|
+
super.addPointInDrawing(e);
|
|
299
|
+
}
|
|
300
|
+
setCanvasSize(size) {
|
|
301
|
+
var _a, _b;
|
|
302
|
+
const pixel = this.pixelRatio;
|
|
303
|
+
this.size = size;
|
|
304
|
+
this.setImgInfo(size);
|
|
305
|
+
this.updateCanvasBasicStyle(this.basicCanvas, size, 0);
|
|
306
|
+
this.updateCanvasBasicStyle(this.canvas, size, 10);
|
|
307
|
+
(_a = this.ctx) == null ? void 0 : _a.scale(pixel, pixel);
|
|
308
|
+
(_b = this.basicCtx) == null ? void 0 : _b.scale(pixel, pixel);
|
|
309
|
+
this.initImgPos();
|
|
310
|
+
this.renderBasicCanvas();
|
|
311
|
+
this.render();
|
|
312
|
+
}
|
|
313
|
+
setPolygonValidAndRender(id, isUpdate = false) {
|
|
314
|
+
if (isUpdate) {
|
|
315
|
+
super.setPolygonValidAndRender(id);
|
|
316
|
+
return;
|
|
317
|
+
}
|
|
318
|
+
this.emit("validUpdate", id);
|
|
319
|
+
}
|
|
320
|
+
onDragMove(e) {
|
|
321
|
+
const newPolygonList = this.polygonList.map((v) => {
|
|
322
|
+
if (this.selectedIDs.includes(v.id)) {
|
|
323
|
+
const selectedPointList = this.dragPolygon(e, v);
|
|
324
|
+
if (!selectedPointList) {
|
|
325
|
+
return v;
|
|
326
|
+
}
|
|
327
|
+
const newData = __spreadProps(__spreadValues({}, v), {
|
|
328
|
+
pointList: selectedPointList
|
|
329
|
+
});
|
|
330
|
+
if (v.isRect === true && this.pattern === tool.EPolygonPattern.Normal) {
|
|
331
|
+
Object.assign(newData, {isRect: false});
|
|
332
|
+
}
|
|
333
|
+
return newData;
|
|
334
|
+
}
|
|
335
|
+
return v;
|
|
336
|
+
});
|
|
337
|
+
this.dragInfo.dragPrevCoord = this.getCoordinateUnderZoom(e);
|
|
338
|
+
this.setPolygonList(newPolygonList);
|
|
339
|
+
this.render();
|
|
340
|
+
}
|
|
341
|
+
onMouseDown(e) {
|
|
342
|
+
if (basicToolOperation.BasicToolOperation.prototype.onMouseDown.call(this, e) || this.forbidMouseOperation || e.ctrlKey === true || e.button !== 0) {
|
|
343
|
+
return;
|
|
344
|
+
}
|
|
345
|
+
if (this.selectedIDs.length < 2) {
|
|
346
|
+
return super.onMouseDown(e);
|
|
347
|
+
}
|
|
348
|
+
const dragStartCoord = this.getCoordinateUnderZoom(e);
|
|
349
|
+
this.dragInfo = {
|
|
350
|
+
dragStartCoord,
|
|
351
|
+
dragTarget: annotation.EDragTarget.Plane,
|
|
352
|
+
initPointList: [],
|
|
353
|
+
changePointIndex: [0],
|
|
354
|
+
originPolygon: this.selectedPolygon,
|
|
355
|
+
dragPrevCoord: dragStartCoord,
|
|
356
|
+
originPolygonList: this.polygonList
|
|
357
|
+
};
|
|
358
|
+
}
|
|
359
|
+
setResultAndSelectedID(polygonList, selectedID) {
|
|
360
|
+
this.setPolygonList(polygonList);
|
|
361
|
+
this.setSelectedIDs([selectedID]);
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
module.exports = PointCloud2dOperation;
|