@realsee/dnalogel 3.45.0 → 3.46.1

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 (100) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/Sculpt/Meshes/Line.d.ts +6 -1
  3. package/dist/Sculpt/utils/removeAllTag.d.ts +2 -0
  4. package/dist/index.cjs.js +53 -53
  5. package/dist/index.js +29600 -29557
  6. package/dist/index.umd.js +49 -49
  7. package/dist/shared-utils/tag.d.ts +6 -3
  8. package/libs/AreaMakerPlugin/Controller.js +151 -78
  9. package/libs/AreaMakerPlugin/index.js +77 -4
  10. package/libs/AreaMakerPlugin/utils/Item.js +191 -111
  11. package/libs/CSS3DRenderPlugin/Controller.js +90 -29
  12. package/libs/CSS3DRenderPlugin/index.js +76 -15
  13. package/libs/CSS3DRenderPlugin/utils/three/CSS3DObject.js +133 -58
  14. package/libs/CSS3DRenderPlugin/utils/three/CSS3DRender.js +182 -116
  15. package/libs/CruisePlugin/BaseController.js +122 -49
  16. package/libs/CruisePlugin/Move.js +74 -21
  17. package/libs/CruisePlugin/Work.js +99 -46
  18. package/libs/CruisePlugin/index.js +80 -27
  19. package/libs/CurrentPanoImagePlugin/Controller.js +177 -104
  20. package/libs/CurrentPanoImagePlugin/index.js +77 -4
  21. package/libs/GuideLinePlugin/Controller.js +79 -26
  22. package/libs/GuideLinePlugin/GuideLineItem.js +83 -30
  23. package/libs/GuideLinePlugin/GuideLineModeItem/index.js +3 -2
  24. package/libs/GuideLinePlugin/GuideLineModeItem.js +82 -29
  25. package/libs/GuideLinePlugin/index.js +80 -27
  26. package/libs/ModelMakerPlugin/Controller.js +140 -82
  27. package/libs/ModelMakerPlugin/index.js +76 -18
  28. package/libs/ModelTVVideoPlugin/Plugin.js +118 -57
  29. package/libs/ModelTVVideoPlugin/index.js +69 -8
  30. package/libs/Object3DHelperPlugin/Controller.js +67 -43
  31. package/libs/Object3DHelperPlugin/index.js +36 -13
  32. package/libs/PanoCompassPlugin/Controller.js +98 -42
  33. package/libs/PanoCompassPlugin/index.js +72 -16
  34. package/libs/PanoDoorLabelPlugin/BaseController.js +99 -26
  35. package/libs/PanoDoorLabelPlugin/Controller.js +188 -115
  36. package/libs/PanoDoorLabelPlugin/index.js +77 -4
  37. package/libs/PanoMeasurePlugin/Components/Controller0.js +141 -88
  38. package/libs/PanoMeasurePlugin/Components/Controller1.js +179 -126
  39. package/libs/PanoMeasurePlugin/Controller/EditController.js +125 -72
  40. package/libs/PanoMeasurePlugin/Controller/WatchController.js +168 -92
  41. package/libs/PanoMeasurePlugin/Controller/index.js +110 -64
  42. package/libs/PanoMeasurePlugin/Model/area.js +115 -38
  43. package/libs/PanoMeasurePlugin/Modules/Magnifier.js +79 -0
  44. package/libs/PanoMeasurePlugin/Modules/UIController/index.js +98 -45
  45. package/libs/PanoMeasurePlugin/index.js +77 -31
  46. package/libs/PanoMeasurePlugin/utils/dom/areaDom.js +99 -20
  47. package/libs/PanoSpatialTagPlugin/Plugin.js +211 -150
  48. package/libs/PanoSpatialTagPlugin/index.js +67 -6
  49. package/libs/PanoTagPlugin/Components/Common/TagPoint.js +149 -68
  50. package/libs/PanoTagPlugin/Components/Tag/MarketingTag.js +296 -216
  51. package/libs/PanoTagPlugin/Components/Tag/index.js +258 -187
  52. package/libs/PanoTagPlugin/Components/TagContainer.js +158 -87
  53. package/libs/PanoTagPlugin/Components/TagItem.js +145 -74
  54. package/libs/PanoTagPlugin/controller/Tag/BaseTag.js +133 -62
  55. package/libs/PanoTagPlugin/controller/Tag/ModelTag.js +110 -39
  56. package/libs/PanoTagPlugin/controller/Tag/PlaneTag.js +106 -35
  57. package/libs/PanoTagPlugin/controller/Tag/PointTag.js +114 -43
  58. package/libs/PanoTagPlugin/controller/TagRender.js +133 -80
  59. package/libs/PanoTagPlugin/controller/TagUtil.js +137 -84
  60. package/libs/PanoTagPlugin/controller/index.js +114 -61
  61. package/libs/PanoTagPlugin/index.js +90 -37
  62. package/libs/PanoTagPlugin/utils/tag/calculateTagConfig.js +122 -41
  63. package/libs/PanoVideoPlugin/Controller.js +138 -65
  64. package/libs/PanoVideoPlugin/VideoMeshController.js +150 -69
  65. package/libs/PanoVideoPlugin/index.js +83 -10
  66. package/libs/PipelinePlugin/Controller.js +200 -128
  67. package/libs/PipelinePlugin/index.js +77 -5
  68. package/libs/PipelinePlugin/utils/Objects/FlowPipe.js +103 -22
  69. package/libs/PipelinePlugin/utils/Objects/HighlightPipe.js +96 -15
  70. package/libs/PipelinePlugin/utils/Objects/Pipe.js +137 -56
  71. package/libs/Sculpt/Meshes/Box.js +6 -5
  72. package/libs/Sculpt/Meshes/Cylinder.js +7 -6
  73. package/libs/Sculpt/Meshes/Line.d.ts +6 -1
  74. package/libs/Sculpt/Meshes/Line.js +80 -57
  75. package/libs/Sculpt/Meshes/Point.js +6 -5
  76. package/libs/Sculpt/Meshes/Polyline.js +5 -4
  77. package/libs/Sculpt/Meshes/Rectangle.js +3 -2
  78. package/libs/Sculpt/Objects/Base/index.js +20 -17
  79. package/libs/Sculpt/Objects/Line/Editor.js +11 -10
  80. package/libs/Sculpt/utils/removeAllTag.d.ts +2 -0
  81. package/libs/Sculpt/utils/removeAllTag.js +10 -0
  82. package/libs/Sculpt/utils/three/ColoredMesh.js +14 -13
  83. package/libs/base/BasePlugin.js +14 -13
  84. package/libs/floorplan/MapviewFloorplanPlugin/Controller.js +129 -59
  85. package/libs/floorplan/MapviewFloorplanPlugin/index.js +76 -6
  86. package/libs/floorplan/ModelFloorplanPlugin/Controller.js +130 -59
  87. package/libs/floorplan/ModelFloorplanPlugin/index.js +76 -5
  88. package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +159 -86
  89. package/libs/floorplan/PanoFloorplanRadarPlugin/index.js +77 -4
  90. package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +152 -81
  91. package/libs/floorplan/TopviewFloorplanPlugin/index.js +76 -5
  92. package/libs/floorplan/index.js +1 -0
  93. package/libs/index.js +193 -192
  94. package/libs/shared-utils/five/index.js +3 -2
  95. package/libs/shared-utils/five/lookObject.js +3 -2
  96. package/libs/shared-utils/logger.js +1 -1
  97. package/libs/shared-utils/tag.d.ts +6 -3
  98. package/libs/shared-utils/tag.js +38 -24
  99. package/libs/shared-utils/three/index.js +1 -0
  100. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
1
  var I = Object.defineProperty;
2
- var R = (c, r, e) => r in c ? I(c, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : c[r] = e;
3
- var s = (c, r, e) => (R(c, typeof r != "symbol" ? r + "" : r, e), e);
2
+ var R = (p, h, t) => h in p ? I(p, h, { enumerable: !0, configurable: !0, writable: !0, value: t }) : p[h] = t;
3
+ var o = (p, h, t) => (R(p, typeof h != "symbol" ? h + "" : h, t), t);
4
4
  import G from "hammerjs";
5
5
  import T from "../Modules/DeleteDom/index.js";
6
6
  import w from "../utils/isNDCPointInScreen.js";
@@ -32,137 +32,213 @@ import "../Model/polyline.js";
32
32
  import "../utils/dom/areaDom.js";
33
33
  import "../../shared-utils/three/geometryUtil.js";
34
34
  import "three/examples/jsm/renderers/CSS3DRenderer";
35
+ import "../../Sculpt/utils/Modules/Global.js";
36
+ import "../../Sculpt/utils/Modules/Cursor.js";
37
+ import "../../Object3DHelperPlugin/Controller.js";
38
+ import "../../base/BasePlugin.js";
39
+ import "../../shared-utils/Subscribe.js";
35
40
  import "../../shared-utils/three/THREESphere.js";
36
41
  import "animejs";
37
- import "../../shared-utils/isNil.js";
42
+ import "../../shared-utils/Utils/FiveUtil.js";
43
+ import "../../shared-utils/Utils/BaseUtil.js";
44
+ import "../../shared-utils/Utils/WorkUtil.js";
45
+ import "../../shared-utils/five/transformPosition.js";
46
+ import "../../shared-utils/url/absoluteUrl.js";
38
47
  import "../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
48
+ import "../../shared-utils/Object3DHelper/Helper/MoveHelper.js";
49
+ import "../../shared-utils/Object3DHelper/Base/BaseHelper.js";
50
+ import "../../shared-utils/Object3DHelper/utils/setObjectQuaternion.js";
39
51
  import "../../shared-utils/three/IObject3D.js";
52
+ import "../../shared-utils/three/boundingBox.js";
53
+ import "../../shared-utils/Object3DHelper/Helper/Objects/ArrowGroup.js";
54
+ import "../../shared-utils/Object3DHelper/utils/direction.js";
55
+ import "../../shared-utils/Object3DHelper/Constants/color.js";
56
+ import "../../shared-utils/Object3DHelper/utils/calculateScaleByCamera.js";
57
+ import "../../CSS3DRenderPlugin/utils/three/CSS3DRender.js";
58
+ import "../../shared-utils/positionToVector3.js";
59
+ import "../../CSS3DRenderPlugin/utils/three/CSS3DRenderer.js";
60
+ import "../../CSS3DRenderPlugin/utils/three/THREEJS_CSS3DRenderer.js";
61
+ import "../../CSS3DRenderPlugin/utils/createResizeObserver.js";
62
+ import "../../CSS3DRenderPlugin/utils/even.js";
63
+ import "../../CSS3DRenderPlugin/utils/three/CSS3DObject.js";
64
+ import "../../CSS3DRenderPlugin/utils/three/OpacityMesh.js";
65
+ import "../../shared-utils/three/getObjectVisible.js";
66
+ import "../../shared-utils/isNil.js";
67
+ import "../../CSS3DRenderPlugin/utils/three/CSS3DScene.js";
68
+ import "../../CSS3DRenderPlugin/utils/getAllCSS3DObject.js";
69
+ import "../../shared-utils/util.js";
70
+ import "../../CSS3DRenderPlugin/utils/three/CSS3DGroup.js";
71
+ import "../../shared-utils/Object3DHelper/Helper/RotateHelper.js";
72
+ import "../../shared-utils/Object3DHelper/Helper/HTML/tipsDom.js";
73
+ import "../../shared-utils/Object3DHelper/Helper/HTML/utils/createElement.js";
74
+ import "../../shared-utils/Object3DHelper/Helper/CSS3DScaleHelper.js";
75
+ import "../../shared-utils/Object3DHelper/Helper/HTML/rectangleScaleDom.js";
76
+ import "../../shared-utils/Object3DHelper/Helper/BoundingBoxHelper.js";
77
+ import "../../shared-utils/Object3DHelper/Controller/MoveController.js";
78
+ import "../../shared-utils/Object3DHelper/Base/BaseController.js";
79
+ import "../../shared-utils/threex/domevents/index.js";
80
+ import "../../shared-utils/Object3DHelper/utils/getMouseRaycaster.js";
81
+ import "../../shared-utils/Object3DHelper/utils/calculateThreeMouse.js";
82
+ import "../../Sculpt/utils/three/rayOnLine.js";
83
+ import "../../Object3DHelperPlugin/FiveControllerWrapper.js";
84
+ import "../../shared-utils/Object3DHelper/index.js";
85
+ import "../../shared-utils/Object3DHelper/Controller/RotateController.js";
86
+ import "../../shared-utils/math/rad2Deg.js";
87
+ import "../../shared-utils/math/deg2Rad.js";
88
+ import "../../shared-utils/Object3DHelper/Controller/CSS3DScaleController.js";
89
+ import "../../shared-utils/Object3DHelper/Controller/RectangleScaleController.js";
90
+ import "../../shared-utils/Object3DHelper/utils/vectorIsEqual.js";
91
+ import "../../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
92
+ import "../../shared-utils/Object3DHelper/Controller/BoundingBoxController.js";
93
+ import "../../shared-utils/Object3DHelper/Helper/ScaleHelper.js";
94
+ import "../../shared-utils/Object3DHelper/Controller/ScaleController.js";
95
+ import "../../shared-utils/five/fiveModelLoad.js";
96
+ import "../../shared-utils/five/FiveDomEvents.js";
97
+ import "../../shared-utils/five/calculateThreeMouse.js";
98
+ import "../../shared-utils/three/THREERaycaster.js";
99
+ import "../../shared-utils/three/PointSelector/index.js";
100
+ import "../../shared-utils/three/PointSelector/utils/PointSelectorHelper.js";
101
+ import "../../shared-utils/three/Magnifier.js";
102
+ import "../../shared-utils/three/PointSelector/utils/PointHelper.js";
103
+ import "../../shared-utils/three/Assets/index.js";
104
+ import "../../shared-utils/three/PointSelector/utils/html.js";
105
+ import "../../shared-utils/five/initialCSS3DRender.js";
106
+ import "../../shared-utils/three/PointSelector/utils/PointHelper2.js";
107
+ import "../../Sculpt/Meshes/Line.js";
108
+ import "../../Sculpt/typings/style.js";
109
+ import "../../shared-utils/tag.js";
110
+ import "../../shared-utils/five/vector3ToScreen.js";
111
+ import "../../Sculpt/utils/removeAllTag.js";
112
+ import "../../CSS3DRenderPlugin/utils/three/CSS3DSprite.js";
113
+ import "../../shared-utils/isTouchDevice.js";
114
+ import "../../shared-utils/five/getPosition.js";
115
+ import "../../shared-utils/five/getRaycasterByNdcPosition.js";
40
116
  import "../../shared-utils/three/generatePolygonGeometry.js";
41
117
  import "../../shared-utils/three/earcut3D.js";
42
118
  import "earcut";
43
119
  import "../../shared-utils/three/getNormal.js";
44
120
  const E = () => !1;
45
- class He extends U {
46
- constructor(e) {
47
- super(e);
48
- s(this, "type", "watch");
49
- s(this, "deleteDom");
50
- s(this, "choose");
121
+ class Qe extends U {
122
+ constructor(t) {
123
+ super(t);
124
+ o(this, "type", "watch");
125
+ o(this, "deleteDom");
126
+ o(this, "choose");
51
127
  // tmd 真没时间改了,先这样吧,理解万岁
52
- s(this, "highlightedLines", []);
53
- s(this, "highlightedArea");
54
- s(this, "fiveElement");
55
- s(this, "editPointState");
56
- s(this, "hammer");
57
- s(this, "onPanStart", (e) => {
58
- var p;
128
+ o(this, "highlightedLines", []);
129
+ o(this, "highlightedArea");
130
+ o(this, "fiveElement");
131
+ o(this, "editPointState");
132
+ o(this, "hammer");
133
+ o(this, "onPanStart", (t) => {
134
+ var l;
59
135
  if (this.model.getAllLines().length === 0 || !this.fiveElement)
60
136
  return;
61
- const i = C(e).point, t = (p = j(this.five, this.model.getAllPoints(), i, 20)) == null ? void 0 : p.point;
62
- if (!t) {
137
+ const i = C(t).point, e = (l = j(this.five, this.model.getAllPoints(), i, 20)) == null ? void 0 : l.point;
138
+ if (!e) {
63
139
  this.editPointState = void 0;
64
140
  return;
65
141
  }
66
- const n = this.model.polylines.find((a) => a.includes(t)), l = {
67
- point: t,
142
+ const n = this.model.polylines.find((a) => a.includes(e)), m = {
143
+ point: e,
68
144
  associatedLines: n.lines
69
145
  };
70
146
  this.hook.emit("wantsDragLine", {
71
- point: t.id,
72
- lines: l.associatedLines.map(({ id: a }) => a)
73
- }) || (this.editPointState = l, this.magnifier.appendTo(this.container), this.magnifier.enable(), this.group.add(this.mouseGroup));
147
+ point: e.id,
148
+ lines: m.associatedLines.map(({ id: a }) => a)
149
+ }) || (this.editPointState = m, this.magnifier.appendTo(this.container), this.magnifier.enable(), this.group.add(this.mouseGroup));
74
150
  });
75
- s(this, "onPanEnd", () => {
76
- this.editPointState && (this.editPointState.associatedLines.forEach((e) => e.mesh.setMaterial({ dashed: !1 })), this.highlightLines(this.editPointState.associatedLines), this.editPointState = void 0, this.magnifier.disable(), this.group.remove(this.mouseGroup));
151
+ o(this, "onPanEnd", () => {
152
+ this.editPointState && (this.editPointState.associatedLines.forEach((t) => t.mesh.setMaterial({ dashed: !1 })), this.highlightLines(this.editPointState.associatedLines), this.editPointState = void 0, this.magnifier.disable(), this.group.remove(this.mouseGroup));
77
153
  });
78
- s(this, "onPan", (e) => {
154
+ o(this, "onPan", (t) => {
79
155
  if (!this.editPointState || !this.fiveElement)
80
156
  return;
81
- const i = C(e).ndcPoint, t = new M();
82
- t.setFromCamera(i, this.five.camera);
83
- const [n] = D(this.five).intersectRaycaster(t);
157
+ const i = C(t).ndcPoint, e = new M();
158
+ e.setFromCamera(i, this.five.camera);
159
+ const [n] = D(this.five).intersectRaycaster(e);
84
160
  n && this.onIntersectionUpdate(n);
85
161
  });
86
- s(this, "onIntersectionUpdate", (e, i) => {
162
+ o(this, "onIntersectionUpdate", (t, i) => {
87
163
  if (this.editPointState) {
88
- if (this.clearHighlightLines(), this.editPointState.point.position.copy(e.point), this.editPointState.associatedLines.forEach((t) => {
89
- t.mesh.setPoints(t.points[0].position.clone(), t.points[1].position.clone()), t.lightMesh.setPoints(t.points[0].position.clone(), t.points[1].position.clone()), t.mesh.setMaterial({ dashed: !0 });
90
- }), this.updateDistanceUI(), this.magnifier.renderWithPoint(e.point), this.mouseGroup.position.copy(e.point), i)
164
+ if (this.clearHighlightLines(), this.editPointState.point.position.copy(t.point), this.editPointState.associatedLines.forEach((e) => {
165
+ e.mesh.setPoints(e.points[0].position.clone(), e.points[1].position.clone()), e.lightMesh.setPoints(e.points[0].position.clone(), e.points[1].position.clone()), e.mesh.setMaterial({ dashed: !0 });
166
+ }), this.updateDistanceUI(), this.magnifier.renderWithPoint(t.point), this.mouseGroup.position.copy(t.point), i)
91
167
  this.mouseGroup.quaternion.copy(i.quaternion);
92
- else if (e.face) {
93
- const n = e.face.normal.clone().multiplyScalar(0.05), d = e.point.clone().add(n).clone().add(n);
94
- this.mouseGroup.lookAt(d);
168
+ else if (t.face) {
169
+ const n = t.face.normal.clone().multiplyScalar(0.05), c = t.point.clone().add(n).clone().add(n);
170
+ this.mouseGroup.lookAt(c);
95
171
  }
96
172
  this.five.needsRender = !0, this.hook.emit(
97
173
  "selectedChange",
98
- this.editPointState.associatedLines.map((t) => t)
174
+ this.editPointState.associatedLines.map((e) => e)
99
175
  );
100
176
  }
101
177
  });
102
- s(this, "wantsPanGesture", () => {
178
+ o(this, "wantsPanGesture", () => {
103
179
  if (this.editPointState)
104
180
  return !1;
105
181
  });
106
- s(this, "wantsTapGesture", (e) => {
182
+ o(this, "wantsTapGesture", (t) => {
107
183
  var S;
108
- const i = this.model.areas.map((o) => e.intersectObject(o.polygon, !0)[0]).sort((o, h) => o.distance - h.distance), t = (S = i[0]) == null ? void 0 : S.object.parent;
109
- if (t instanceof F) {
110
- const o = this.model.areas.find((h) => h.polygon === t);
111
- if (o) {
112
- const { x: h, y: u } = i[0].point.clone().project(this.five.camera), m = `${(h + 1) / 2 * 100}%`, g = `${(-u + 1) / 2 * 100}%`;
113
- return this.chooseArea(o, { left: m, top: g }), !1;
184
+ const i = this.model.areas.map((s) => t.intersectObject(s.polygon, !0)[0]).sort((s, r) => s.distance - r.distance), e = (S = i[0]) == null ? void 0 : S.object.parent;
185
+ if (e instanceof F) {
186
+ const s = this.model.areas.find((r) => r.polygon === e);
187
+ if (s) {
188
+ const { x: r, y: u } = i[0].point.clone().project(this.five.camera), d = `${(r + 1) / 2 * 100}%`, g = `${(-u + 1) / 2 * 100}%`;
189
+ return this.chooseArea(s, { left: d, top: g }), !1;
114
190
  }
115
191
  }
116
- const n = D(this.five), [l] = n.intersectRaycaster(e);
117
- if (!l)
192
+ const n = D(this.five), [m] = n.intersectRaycaster(t);
193
+ if (!m)
118
194
  return;
119
- const d = this.five.camera, p = l.point.clone().project(d), a = this.container.clientWidth, f = this.container.clientHeight, P = new L(p.x * a, p.y * f), v = this.model.getAllLines().map((o) => {
120
- const [h, u] = o.points, m = h.position.clone().project(d), g = u.position.clone().project(d);
121
- if (!w(m) && !w(g))
195
+ const c = this.five.camera, l = m.point.clone().project(c), a = this.container.clientWidth, f = this.container.clientHeight, P = new L(l.x * a, l.y * f), v = this.model.getAllLines().map((s) => {
196
+ const [r, u] = s.points, d = r.position.clone().project(c), g = u.position.clone().project(c);
197
+ if (!w(d) && !w(g))
122
198
  return null;
123
- const H = new L(m.x * a, m.y * f), k = new L(g.x * a, g.y * f);
124
- return { id: o.id, points: [H, k] };
125
- }).filter((o) => !!o);
199
+ const H = new L(d.x * a, d.y * f), k = new L(g.x * a, g.y * f);
200
+ return { id: s.id, points: [H, k] };
201
+ }).filter((s) => !!s);
126
202
  if (v.length === 0)
127
203
  return;
128
- const y = v.map((o) => {
129
- const h = b(P, o.points);
130
- return { id: o.id, distance: h.distanceTo(P) };
131
- }).sort((o, h) => o.distance - h.distance)[0];
204
+ const y = v.map((s) => {
205
+ const r = b(P, s.points);
206
+ return { id: s.id, distance: r.distanceTo(P) };
207
+ }).sort((s, r) => s.distance - r.distance)[0];
132
208
  if (y.distance > 20)
133
209
  return;
134
- const A = this.model.getAllLines().find(({ id: o }) => o === y.id);
210
+ const A = this.model.getAllLines().find(({ id: s }) => s === y.id);
135
211
  if (A)
136
212
  return this.chooseLine(A), !1;
137
213
  });
138
- s(this, "chooseLine", (e) => {
214
+ o(this, "chooseLine", (t) => {
139
215
  this.choose = "line";
140
- const i = e.getPolyline().lines;
216
+ const i = t.getPolyline().lines;
141
217
  this.deleteDom.setLines(i).updatePosition().show(), this.highlightLines(i), this.five.needsRender = !0, this.hook.emit(
142
218
  "selectedChange",
143
- i.map((t) => t)
219
+ i.map((e) => e)
144
220
  );
145
221
  });
146
- s(this, "chooseArea", (e, i) => {
147
- this.choose = e, this.deleteDom.updatePosition(i.left, `calc(${i.top} - 20px)`).show(), this.highlightArea(e);
222
+ o(this, "chooseArea", (t, i) => {
223
+ this.choose = t, this.deleteDom.updatePosition(i.left, `calc(${i.top} - 20px)`).show(), this.highlightArea(t);
148
224
  });
149
- s(this, "polylineRemoved", (e) => {
150
- e.lines.forEach((i) => this.removeLine(i)), this.hook.emit(
225
+ o(this, "polylineRemoved", (t) => {
226
+ t.lines.forEach((i) => this.removeLine(i)), this.hook.emit(
151
227
  "selectedChange",
152
228
  this.model.getAllLines().filter((i) => i.selected).map((i) => i)
153
229
  );
154
230
  });
155
- s(this, "onCameraUpdate", () => {
231
+ o(this, "onCameraUpdate", () => {
156
232
  this.updateDistanceUI(), this.highlightedLines.length > 0 && this.deleteDom.updatePosition();
157
233
  });
158
- s(this, "deleteArea", (e) => {
159
- this.unHighlightArea(e), e.dispose(), this.deleteDom.hide();
234
+ o(this, "deleteArea", (t) => {
235
+ this.unHighlightArea(t), t.dispose(), this.deleteDom.hide();
160
236
  });
161
- s(this, "deleteLine", () => {
162
- const e = this.highlightedLines[0], i = this.model.getPolylineByLine(e);
237
+ o(this, "deleteLine", () => {
238
+ const t = this.highlightedLines[0], i = this.model.getPolylineByLine(t);
163
239
  i && (this.model.removePolyline(i), this.highlightedLines = [], this.deleteDom.setLines([]).hide());
164
240
  });
165
- s(this, "cancelDeleteClickCallback", () => {
241
+ o(this, "cancelDeleteClickCallback", () => {
166
242
  this.deleteDom.hide(), this.clearHighlightLines(), this.unHighlightArea();
167
243
  });
168
244
  this.deleteDom = new T(this.five, {
@@ -171,49 +247,49 @@ class He extends U {
171
247
  this.choose === "line" ? this.deleteLine() : this.choose instanceof x && this.deleteArea(this.choose);
172
248
  },
173
249
  cancel: this.cancelDeleteClickCallback
174
- }).appendTo(this.container), this.model.getAllLines().forEach((t) => {
175
- t.distanceItem.appendTo(this.container), t.distanceItem.update(this.five), t.hook.on("selected", this.chooseLine), t.distanceItem.setCanSelect(!0), this.group.add(t.mesh);
176
- }), this.model.getAllAreas().forEach((t) => {
177
- t.areaItem.appendTo(this.container), t.areaItem.updateArea(this.five), t.hook.on("selected", this.chooseArea), t.areaItem.setCanSelect(!0), this.group.add(t.polygon), t.polyline.lines.forEach((n) => {
250
+ }).appendTo(this.container), this.model.getAllLines().forEach((e) => {
251
+ e.distanceItem.appendTo(this.container), e.distanceItem.update(this.five), e.hook.on("selected", this.chooseLine), e.distanceItem.setCanSelect(!0), this.group.add(e.mesh);
252
+ }), this.model.getAllAreas().forEach((e) => {
253
+ e.areaItem.appendTo(this.container), e.areaItem.updateArea(this.five), e.hook.on("selected", this.chooseArea), e.areaItem.setCanSelect(!0), this.group.add(e.polygon), e.polyline.lines.forEach((n) => {
178
254
  n.distanceItem.appendTo(this.container), n.distanceItem.update(this.five), this.group.add(n.mesh);
179
255
  });
180
256
  });
181
257
  const i = this.five.getElement();
182
258
  if (i) {
183
259
  this.fiveElement = i;
184
- const t = new G(i);
185
- this.hammer = t, t.on("pan", this.onPan), t.on("panstart", this.onPanStart), t.on("panend", this.onPanEnd);
260
+ const e = new G(i);
261
+ this.hammer = e, e.on("pan", this.onPan), e.on("panstart", this.onPanStart), e.on("panend", this.onPanEnd);
186
262
  }
187
263
  this.updateDistanceUI(), this.five.needsRender = !0, this.five.on("cameraUpdate", this.onCameraUpdate), this.five.on("wantsTapGesture", this.wantsTapGesture), this.five.on("wantsPanGesture", this.wantsPanGesture), this.five.on("wantsChangeMode", E), this.model.hook.on("polylineRemoved", this.polylineRemoved);
188
264
  }
189
265
  dispose() {
190
- var e;
191
- super.dispose(), this.deleteDom.dispose(), this.model.hook.off("polylineRemoved", this.polylineRemoved), this.model.getAllLines().forEach((i) => i.hook.off("selected", this.chooseLine)), this.five.off("cameraUpdate", this.onCameraUpdate), this.five.off("wantsPanGesture", this.wantsPanGesture), this.five.off("wantsTapGesture", this.wantsTapGesture), this.five.off("wantsChangeMode", E), this.five.needsRender = !0, this.hook.emit("selectedChange", []), (e = this.hammer) == null || e.destroy();
266
+ var t;
267
+ super.dispose(), this.deleteDom.dispose(), this.model.hook.off("polylineRemoved", this.polylineRemoved), this.model.getAllLines().forEach((i) => i.hook.off("selected", this.chooseLine)), this.five.off("cameraUpdate", this.onCameraUpdate), this.five.off("wantsPanGesture", this.wantsPanGesture), this.five.off("wantsTapGesture", this.wantsTapGesture), this.five.off("wantsChangeMode", E), this.five.needsRender = !0, this.hook.emit("selectedChange", []), (t = this.hammer) == null || t.destroy();
192
268
  }
193
- highlightLine(e) {
194
- e.selected || (e.selected = !0, this.group.add(e.lightMesh), e.distanceItem.highlight(), this.five.needsRender = !0);
269
+ highlightLine(t) {
270
+ t.selected || (t.selected = !0, this.group.add(t.lightMesh), t.distanceItem.highlight(), this.five.needsRender = !0);
195
271
  }
196
272
  clearHighlightLines() {
197
273
  this.group.children.length !== 0 && (this.unHighlightLines(this.highlightedLines), this.highlightedLines = []);
198
274
  }
199
- highlightArea(e) {
200
- this.unHighlightLines(), this.unHighlightArea(), this.highlightLines(e.polyline.lines), this.five.needsRender = !0;
275
+ highlightArea(t) {
276
+ this.unHighlightLines(), this.unHighlightArea(), this.highlightLines(t.polyline.lines), this.five.needsRender = !0;
201
277
  }
202
- unHighlightArea(e) {
203
- const i = e != null ? e : this.highlightedArea;
278
+ unHighlightArea(t) {
279
+ const i = t != null ? t : this.highlightedArea;
204
280
  i && (this.unHighlightLines(i.polyline.lines), this.five.needsRender = !0);
205
281
  }
206
- highlightLines(e) {
207
- this.unHighlightLines(), this.highlightedLines = e, e.forEach((i) => this.highlightLine(i));
282
+ highlightLines(t) {
283
+ this.unHighlightLines(), this.highlightedLines = t, t.forEach((i) => this.highlightLine(i));
208
284
  }
209
- unHighlightLines(e) {
285
+ unHighlightLines(t) {
210
286
  this.unHighlightArea();
211
- const i = e != null ? e : this.highlightedLines;
212
- i && i.forEach((t) => {
213
- t.selected = !1, t.distanceItem.unHighlight(), this.group.remove(t.lightMesh), this.five.needsRender = !0;
287
+ const i = t != null ? t : this.highlightedLines;
288
+ i && i.forEach((e) => {
289
+ e.selected = !1, e.distanceItem.unHighlight(), this.group.remove(e.lightMesh), this.five.needsRender = !0;
214
290
  });
215
291
  }
216
292
  }
217
293
  export {
218
- He as default
294
+ Qe as default
219
295
  };