build-dxf 0.0.20-14 → 0.0.20-16
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/package.json +1 -1
- package/src/build.js +612 -434
- package/src/index.css +1 -1
- package/src/index3.js +864 -716
- package/src/utils/DxfSystem/components/AngleCorrectionDxf.d.ts +9 -0
- package/src/utils/DxfSystem/components/Dxf.d.ts +35 -5
- package/src/utils/DxfSystem/components/LineAnalysis.d.ts +3 -1
- package/src/utils/DxfSystem/index.d.ts +2 -0
- package/src/utils/DxfSystem/plugin/Editor/components/CommandFlow/VerticalCorrection.d.ts +20 -14
- package/src/utils/DxfSystem/plugin/Editor/components/CommandFlow/VerticalReferenceLine.d.ts +21 -0
- package/src/utils/DxfSystem/plugin/Editor/components/CommandFlow/ViewAngle.d.ts +10 -4
- package/src/utils/DxfSystem/plugin/Editor/components/RenderManager.d.ts +4 -1
- package/src/utils/Quadtree/LineSegment.d.ts +19 -1
- package/src/utils/Quadtree/Point.d.ts +7 -1
- package/src/utils/deepClone.d.ts +6 -0
package/src/index3.js
CHANGED
|
@@ -1,73 +1,73 @@
|
|
|
1
1
|
import * as m from "three";
|
|
2
|
-
import { i as
|
|
3
|
-
import { C as
|
|
2
|
+
import { i as ct, n as mt, r as qe, t as Ue, c as Pe, d as ht, e as ut, f as Ae, g as Q, _ as Ze, u as pt, h as ye, j as _e, w as gt, k as vt, l as ft, p as yt, m as wt, o as bt, T as Ne, q as Oe, s as Ct, v as xt, x as Re, y as De, z as ke, A as Et, B as Mt, L as we, D as Lt, b as Ke, E as ge, S as kt } from "./selectLocalFile.js";
|
|
3
|
+
import { C as Ee, L as ce, P as W, B as Ye, E as Xe, b as Fe, Q as ze, W as It } from "./build.js";
|
|
4
4
|
import "clipper-lib";
|
|
5
5
|
import "dxf-writer";
|
|
6
6
|
import "three/addons/controls/OrbitControls.js";
|
|
7
|
-
import { watch as
|
|
8
|
-
function
|
|
7
|
+
import { watch as J, ref as S, defineComponent as me, computed as B, createElementBlock as O, openBlock as P, normalizeClass as T, unref as g, renderSlot as Ce, createVNode as F, Transition as xe, withCtx as j, withDirectives as $e, createElementVNode as I, normalizeStyle as Se, createTextVNode as se, toDisplayString as ie, vShow as et, shallowReactive as Dt, onMounted as tt, createBlock as ve, createCommentVNode as Z, resolveDynamicComponent as Pt, Fragment as fe, withModifiers as At, nextTick as be, isVNode as nt, render as Te, toRaw as St, onUnmounted as Bt, renderList as Ie, createStaticVNode as _t, TransitionGroup as Nt, createApp as Ot } from "vue";
|
|
8
|
+
function ot(i) {
|
|
9
9
|
var e;
|
|
10
|
-
const t = qe(
|
|
10
|
+
const t = qe(i);
|
|
11
11
|
return (e = t?.$el) != null ? e : t;
|
|
12
12
|
}
|
|
13
|
-
const
|
|
14
|
-
function Rt(...
|
|
13
|
+
const at = Pe ? window : void 0;
|
|
14
|
+
function Rt(...i) {
|
|
15
15
|
let e, t, n, o;
|
|
16
|
-
if (
|
|
17
|
-
return
|
|
16
|
+
if (ct(i[0]) || Array.isArray(i[0]) ? ([t, n, o] = i, e = at) : [e, t, n, o] = i, !e)
|
|
17
|
+
return mt;
|
|
18
18
|
Array.isArray(t) || (t = [t]), Array.isArray(n) || (n = [n]);
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
},
|
|
22
|
-
|
|
23
|
-
}, { immediate: !0, flush: "post" }),
|
|
24
|
-
|
|
19
|
+
const a = [], s = () => {
|
|
20
|
+
a.forEach((c) => c()), a.length = 0;
|
|
21
|
+
}, r = (c, h, y, w) => (c.addEventListener(h, y, w), () => c.removeEventListener(h, y, w)), l = J(() => [ot(e), qe(o)], ([c, h]) => {
|
|
22
|
+
s(), c && a.push(...t.flatMap((y) => n.map((w) => r(c, y, w, h))));
|
|
23
|
+
}, { immediate: !0, flush: "post" }), d = () => {
|
|
24
|
+
l(), s();
|
|
25
25
|
};
|
|
26
|
-
return
|
|
26
|
+
return Ue(d), d;
|
|
27
27
|
}
|
|
28
|
-
function
|
|
29
|
-
const t =
|
|
30
|
-
return n(),
|
|
28
|
+
function Kt(i, e = !1) {
|
|
29
|
+
const t = S(), n = () => t.value = !!i();
|
|
30
|
+
return n(), ht(n, e), t;
|
|
31
31
|
}
|
|
32
|
-
const
|
|
33
|
-
|
|
34
|
-
var
|
|
32
|
+
const Ve = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, je = "__vueuse_ssr_handlers__";
|
|
33
|
+
Ve[je] = Ve[je] || {};
|
|
34
|
+
var Ge = Object.getOwnPropertySymbols, Ft = Object.prototype.hasOwnProperty, zt = Object.prototype.propertyIsEnumerable, Tt = (i, e) => {
|
|
35
35
|
var t = {};
|
|
36
|
-
for (var n in
|
|
37
|
-
|
|
38
|
-
if (
|
|
39
|
-
for (var n of
|
|
40
|
-
e.indexOf(n) < 0 &&
|
|
36
|
+
for (var n in i)
|
|
37
|
+
Ft.call(i, n) && e.indexOf(n) < 0 && (t[n] = i[n]);
|
|
38
|
+
if (i != null && Ge)
|
|
39
|
+
for (var n of Ge(i))
|
|
40
|
+
e.indexOf(n) < 0 && zt.call(i, n) && (t[n] = i[n]);
|
|
41
41
|
return t;
|
|
42
42
|
};
|
|
43
|
-
function
|
|
44
|
-
const n = t, { window: o =
|
|
45
|
-
let
|
|
46
|
-
const
|
|
47
|
-
|
|
48
|
-
},
|
|
49
|
-
|
|
43
|
+
function Vt(i, e, t = {}) {
|
|
44
|
+
const n = t, { window: o = at } = n, a = Tt(n, ["window"]);
|
|
45
|
+
let s;
|
|
46
|
+
const r = Kt(() => o && "ResizeObserver" in o), l = () => {
|
|
47
|
+
s && (s.disconnect(), s = void 0);
|
|
48
|
+
}, d = J(() => ot(i), (h) => {
|
|
49
|
+
l(), r.value && o && h && (s = new ResizeObserver(e), s.observe(h, a));
|
|
50
50
|
}, { immediate: !0, flush: "post" }), c = () => {
|
|
51
|
-
|
|
51
|
+
l(), d();
|
|
52
52
|
};
|
|
53
|
-
return
|
|
54
|
-
isSupported:
|
|
53
|
+
return Ue(c), {
|
|
54
|
+
isSupported: r,
|
|
55
55
|
stop: c
|
|
56
56
|
};
|
|
57
57
|
}
|
|
58
|
-
var
|
|
59
|
-
(function(
|
|
60
|
-
|
|
61
|
-
})(
|
|
62
|
-
var
|
|
58
|
+
var Qe;
|
|
59
|
+
(function(i) {
|
|
60
|
+
i.UP = "UP", i.RIGHT = "RIGHT", i.DOWN = "DOWN", i.LEFT = "LEFT", i.NONE = "NONE";
|
|
61
|
+
})(Qe || (Qe = {}));
|
|
62
|
+
var jt = Object.defineProperty, He = Object.getOwnPropertySymbols, Gt = Object.prototype.hasOwnProperty, Qt = Object.prototype.propertyIsEnumerable, Je = (i, e, t) => e in i ? jt(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t, Ht = (i, e) => {
|
|
63
63
|
for (var t in e || (e = {}))
|
|
64
|
-
|
|
65
|
-
if (
|
|
66
|
-
for (var t of
|
|
67
|
-
|
|
68
|
-
return
|
|
64
|
+
Gt.call(e, t) && Je(i, t, e[t]);
|
|
65
|
+
if (He)
|
|
66
|
+
for (var t of He(e))
|
|
67
|
+
Qt.call(e, t) && Je(i, t, e[t]);
|
|
68
|
+
return i;
|
|
69
69
|
};
|
|
70
|
-
const
|
|
70
|
+
const Jt = {
|
|
71
71
|
easeInSine: [0.12, 0, 0.39, 0],
|
|
72
72
|
easeOutSine: [0.61, 1, 0.88, 1],
|
|
73
73
|
easeInOutSine: [0.37, 0, 0.63, 1],
|
|
@@ -93,12 +93,12 @@ const qt = {
|
|
|
93
93
|
easeOutBack: [0.34, 1.56, 0.64, 1],
|
|
94
94
|
easeInOutBack: [0.68, -0.6, 0.32, 1.6]
|
|
95
95
|
};
|
|
96
|
-
|
|
97
|
-
linear:
|
|
98
|
-
},
|
|
99
|
-
const
|
|
96
|
+
Ht({
|
|
97
|
+
linear: ut
|
|
98
|
+
}, Jt);
|
|
99
|
+
const Wt = (i) => i, qt = {
|
|
100
100
|
esc: "Escape"
|
|
101
|
-
},
|
|
101
|
+
}, Ut = Ae({
|
|
102
102
|
value: {
|
|
103
103
|
type: [String, Number],
|
|
104
104
|
default: ""
|
|
@@ -120,59 +120,59 @@ const $t = (r) => r, Ht = {
|
|
|
120
120
|
},
|
|
121
121
|
color: String,
|
|
122
122
|
badgeStyle: {
|
|
123
|
-
type:
|
|
123
|
+
type: Q([String, Object, Array])
|
|
124
124
|
},
|
|
125
125
|
offset: {
|
|
126
|
-
type:
|
|
126
|
+
type: Q(Array),
|
|
127
127
|
default: [0, 0]
|
|
128
128
|
},
|
|
129
129
|
badgeClass: {
|
|
130
130
|
type: String
|
|
131
131
|
}
|
|
132
|
-
}),
|
|
132
|
+
}), Zt = me({
|
|
133
133
|
name: "ElBadge"
|
|
134
|
-
}),
|
|
135
|
-
...
|
|
136
|
-
props:
|
|
137
|
-
setup(
|
|
138
|
-
const t =
|
|
139
|
-
var
|
|
134
|
+
}), Yt = /* @__PURE__ */ me({
|
|
135
|
+
...Zt,
|
|
136
|
+
props: Ut,
|
|
137
|
+
setup(i, { expose: e }) {
|
|
138
|
+
const t = i, n = pt("badge"), o = B(() => t.isDot ? "" : ye(t.value) && ye(t.max) ? t.max < t.value ? `${t.max}+` : `${t.value}` : `${t.value}`), a = B(() => {
|
|
139
|
+
var s, r, l, d, c;
|
|
140
140
|
return [
|
|
141
141
|
{
|
|
142
142
|
backgroundColor: t.color,
|
|
143
|
-
marginRight:
|
|
144
|
-
marginTop:
|
|
143
|
+
marginRight: _e(-((r = (s = t.offset) == null ? void 0 : s[0]) != null ? r : 0)),
|
|
144
|
+
marginTop: _e((d = (l = t.offset) == null ? void 0 : l[1]) != null ? d : 0)
|
|
145
145
|
},
|
|
146
146
|
(c = t.badgeStyle) != null ? c : {}
|
|
147
147
|
];
|
|
148
148
|
});
|
|
149
149
|
return e({
|
|
150
150
|
content: o
|
|
151
|
-
}), (
|
|
152
|
-
class:
|
|
151
|
+
}), (s, r) => (P(), O("div", {
|
|
152
|
+
class: T(g(n).b())
|
|
153
153
|
}, [
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
name: `${
|
|
154
|
+
Ce(s.$slots, "default"),
|
|
155
|
+
F(xe, {
|
|
156
|
+
name: `${g(n).namespace.value}-zoom-in-center`,
|
|
157
157
|
persisted: ""
|
|
158
158
|
}, {
|
|
159
|
-
default:
|
|
160
|
-
|
|
161
|
-
class:
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
159
|
+
default: j(() => [
|
|
160
|
+
$e(I("sup", {
|
|
161
|
+
class: T([
|
|
162
|
+
g(n).e("content"),
|
|
163
|
+
g(n).em("content", s.type),
|
|
164
|
+
g(n).is("fixed", !!s.$slots.default),
|
|
165
|
+
g(n).is("dot", s.isDot),
|
|
166
|
+
g(n).is("hide-zero", !s.showZero && t.value === 0),
|
|
167
|
+
s.badgeClass
|
|
168
168
|
]),
|
|
169
|
-
style:
|
|
169
|
+
style: Se(g(a))
|
|
170
170
|
}, [
|
|
171
|
-
|
|
172
|
-
|
|
171
|
+
Ce(s.$slots, "content", { value: g(o) }, () => [
|
|
172
|
+
se(ie(g(o)), 1)
|
|
173
173
|
])
|
|
174
174
|
], 6), [
|
|
175
|
-
[
|
|
175
|
+
[et, !s.hidden && (g(o) || s.isDot || s.$slots.content)]
|
|
176
176
|
])
|
|
177
177
|
]),
|
|
178
178
|
_: 3
|
|
@@ -180,63 +180,63 @@ const $t = (r) => r, Ht = {
|
|
|
180
180
|
], 2));
|
|
181
181
|
}
|
|
182
182
|
});
|
|
183
|
-
var
|
|
184
|
-
const
|
|
183
|
+
var Xt = /* @__PURE__ */ Ze(Yt, [["__file", "badge.vue"]]);
|
|
184
|
+
const $t = gt(Xt), en = Ae({
|
|
185
185
|
a11y: {
|
|
186
186
|
type: Boolean,
|
|
187
187
|
default: !0
|
|
188
188
|
},
|
|
189
189
|
locale: {
|
|
190
|
-
type:
|
|
190
|
+
type: Q(Object)
|
|
191
191
|
},
|
|
192
|
-
size:
|
|
192
|
+
size: ft,
|
|
193
193
|
button: {
|
|
194
|
-
type:
|
|
194
|
+
type: Q(Object)
|
|
195
195
|
},
|
|
196
196
|
card: {
|
|
197
|
-
type:
|
|
197
|
+
type: Q(Object)
|
|
198
198
|
},
|
|
199
199
|
dialog: {
|
|
200
|
-
type:
|
|
200
|
+
type: Q(Object)
|
|
201
201
|
},
|
|
202
202
|
link: {
|
|
203
|
-
type:
|
|
203
|
+
type: Q(Object)
|
|
204
204
|
},
|
|
205
205
|
experimentalFeatures: {
|
|
206
|
-
type:
|
|
206
|
+
type: Q(Object)
|
|
207
207
|
},
|
|
208
208
|
keyboardNavigation: {
|
|
209
209
|
type: Boolean,
|
|
210
210
|
default: !0
|
|
211
211
|
},
|
|
212
212
|
message: {
|
|
213
|
-
type:
|
|
213
|
+
type: Q(Object)
|
|
214
214
|
},
|
|
215
215
|
zIndex: Number,
|
|
216
216
|
namespace: {
|
|
217
217
|
type: String,
|
|
218
218
|
default: "el"
|
|
219
219
|
},
|
|
220
|
-
...
|
|
221
|
-
}),
|
|
222
|
-
|
|
220
|
+
...vt
|
|
221
|
+
}), z = {};
|
|
222
|
+
me({
|
|
223
223
|
name: "ElConfigProvider",
|
|
224
|
-
props:
|
|
225
|
-
setup(
|
|
226
|
-
const t =
|
|
227
|
-
return
|
|
228
|
-
var o,
|
|
229
|
-
Object.assign(
|
|
230
|
-
}, { immediate: !0, deep: !0 }), () =>
|
|
224
|
+
props: en,
|
|
225
|
+
setup(i, { slots: e }) {
|
|
226
|
+
const t = yt(i);
|
|
227
|
+
return J(() => i.message, (n) => {
|
|
228
|
+
var o, a;
|
|
229
|
+
Object.assign(z, (a = (o = t?.value) == null ? void 0 : o.message) != null ? a : {}, n ?? {});
|
|
230
|
+
}, { immediate: !0, deep: !0 }), () => Ce(e, "default", { config: t?.value });
|
|
231
231
|
}
|
|
232
232
|
});
|
|
233
|
-
const
|
|
233
|
+
const st = [
|
|
234
234
|
"primary",
|
|
235
235
|
"success",
|
|
236
236
|
"info",
|
|
237
237
|
"warning",
|
|
238
238
|
"error"
|
|
239
|
-
],
|
|
239
|
+
], N = Wt({
|
|
240
240
|
customClass: "",
|
|
241
241
|
dangerouslyUseHTMLString: !1,
|
|
242
242
|
duration: 3e3,
|
|
@@ -251,271 +251,271 @@ const tt = [
|
|
|
251
251
|
zIndex: 0,
|
|
252
252
|
grouping: !1,
|
|
253
253
|
repeatNum: 1,
|
|
254
|
-
appendTo:
|
|
255
|
-
}),
|
|
254
|
+
appendTo: Pe ? document.body : void 0
|
|
255
|
+
}), tn = Ae({
|
|
256
256
|
customClass: {
|
|
257
257
|
type: String,
|
|
258
|
-
default:
|
|
258
|
+
default: N.customClass
|
|
259
259
|
},
|
|
260
260
|
dangerouslyUseHTMLString: {
|
|
261
261
|
type: Boolean,
|
|
262
|
-
default:
|
|
262
|
+
default: N.dangerouslyUseHTMLString
|
|
263
263
|
},
|
|
264
264
|
duration: {
|
|
265
265
|
type: Number,
|
|
266
|
-
default:
|
|
266
|
+
default: N.duration
|
|
267
267
|
},
|
|
268
268
|
icon: {
|
|
269
|
-
type:
|
|
270
|
-
default:
|
|
269
|
+
type: wt,
|
|
270
|
+
default: N.icon
|
|
271
271
|
},
|
|
272
272
|
id: {
|
|
273
273
|
type: String,
|
|
274
|
-
default:
|
|
274
|
+
default: N.id
|
|
275
275
|
},
|
|
276
276
|
message: {
|
|
277
|
-
type:
|
|
277
|
+
type: Q([
|
|
278
278
|
String,
|
|
279
279
|
Object,
|
|
280
280
|
Function
|
|
281
281
|
]),
|
|
282
|
-
default:
|
|
282
|
+
default: N.message
|
|
283
283
|
},
|
|
284
284
|
onClose: {
|
|
285
|
-
type:
|
|
286
|
-
default:
|
|
285
|
+
type: Q(Function),
|
|
286
|
+
default: N.onClose
|
|
287
287
|
},
|
|
288
288
|
showClose: {
|
|
289
289
|
type: Boolean,
|
|
290
|
-
default:
|
|
290
|
+
default: N.showClose
|
|
291
291
|
},
|
|
292
292
|
type: {
|
|
293
293
|
type: String,
|
|
294
|
-
values:
|
|
295
|
-
default:
|
|
294
|
+
values: st,
|
|
295
|
+
default: N.type
|
|
296
296
|
},
|
|
297
297
|
plain: {
|
|
298
298
|
type: Boolean,
|
|
299
|
-
default:
|
|
299
|
+
default: N.plain
|
|
300
300
|
},
|
|
301
301
|
offset: {
|
|
302
302
|
type: Number,
|
|
303
|
-
default:
|
|
303
|
+
default: N.offset
|
|
304
304
|
},
|
|
305
305
|
zIndex: {
|
|
306
306
|
type: Number,
|
|
307
|
-
default:
|
|
307
|
+
default: N.zIndex
|
|
308
308
|
},
|
|
309
309
|
grouping: {
|
|
310
310
|
type: Boolean,
|
|
311
|
-
default:
|
|
311
|
+
default: N.grouping
|
|
312
312
|
},
|
|
313
313
|
repeatNum: {
|
|
314
314
|
type: Number,
|
|
315
|
-
default:
|
|
315
|
+
default: N.repeatNum
|
|
316
316
|
}
|
|
317
|
-
}),
|
|
317
|
+
}), nn = {
|
|
318
318
|
destroy: () => !0
|
|
319
|
-
},
|
|
320
|
-
const e =
|
|
319
|
+
}, H = Dt([]), on = (i) => {
|
|
320
|
+
const e = H.findIndex((o) => o.id === i), t = H[e];
|
|
321
321
|
let n;
|
|
322
|
-
return e > 0 && (n =
|
|
323
|
-
},
|
|
324
|
-
const { prev: e } =
|
|
322
|
+
return e > 0 && (n = H[e - 1]), { current: t, prev: n };
|
|
323
|
+
}, an = (i) => {
|
|
324
|
+
const { prev: e } = on(i);
|
|
325
325
|
return e ? e.vm.exposed.bottom.value : 0;
|
|
326
|
-
},
|
|
326
|
+
}, sn = (i, e) => H.findIndex((n) => n.id === i) > 0 ? 16 : e, rn = me({
|
|
327
327
|
name: "ElMessage"
|
|
328
|
-
}),
|
|
329
|
-
...
|
|
330
|
-
props:
|
|
331
|
-
emits:
|
|
332
|
-
setup(
|
|
333
|
-
const n =
|
|
334
|
-
let
|
|
335
|
-
const
|
|
336
|
-
const
|
|
337
|
-
return { [
|
|
338
|
-
}),
|
|
339
|
-
top: `${
|
|
340
|
-
zIndex:
|
|
328
|
+
}), dn = /* @__PURE__ */ me({
|
|
329
|
+
...rn,
|
|
330
|
+
props: tn,
|
|
331
|
+
emits: nn,
|
|
332
|
+
setup(i, { expose: e, emit: t }) {
|
|
333
|
+
const n = i, { Close: o } = Ct, a = S(!1), { ns: s, zIndex: r } = bt("message"), { currentZIndex: l, nextZIndex: d } = r, c = S(), h = S(!1), y = S(0);
|
|
334
|
+
let w;
|
|
335
|
+
const b = B(() => n.type ? n.type === "error" ? "danger" : n.type : "info"), f = B(() => {
|
|
336
|
+
const p = n.type;
|
|
337
|
+
return { [s.bm("icon", p)]: p && Ne[p] };
|
|
338
|
+
}), M = B(() => n.icon || Ne[n.type] || ""), L = B(() => an(n.id)), A = B(() => sn(n.id, n.offset) + L.value), G = B(() => y.value + A.value), E = B(() => ({
|
|
339
|
+
top: `${A.value}px`,
|
|
340
|
+
zIndex: l.value
|
|
341
341
|
}));
|
|
342
|
-
function
|
|
343
|
-
n.duration !== 0 && ({ stop:
|
|
344
|
-
|
|
342
|
+
function K() {
|
|
343
|
+
n.duration !== 0 && ({ stop: w } = xt(() => {
|
|
344
|
+
x();
|
|
345
345
|
}, n.duration));
|
|
346
346
|
}
|
|
347
|
-
function
|
|
348
|
-
|
|
347
|
+
function k() {
|
|
348
|
+
w?.();
|
|
349
349
|
}
|
|
350
|
-
function
|
|
351
|
-
h.value = !1,
|
|
352
|
-
var
|
|
353
|
-
|
|
350
|
+
function x() {
|
|
351
|
+
h.value = !1, be(() => {
|
|
352
|
+
var p;
|
|
353
|
+
a.value || ((p = n.onClose) == null || p.call(n), t("destroy"));
|
|
354
354
|
});
|
|
355
355
|
}
|
|
356
|
-
function
|
|
357
|
-
|
|
356
|
+
function _({ code: p }) {
|
|
357
|
+
p === qt.esc && x();
|
|
358
358
|
}
|
|
359
|
-
return
|
|
360
|
-
|
|
361
|
-
}),
|
|
362
|
-
|
|
363
|
-
}), Rt(document, "keydown",
|
|
364
|
-
|
|
359
|
+
return tt(() => {
|
|
360
|
+
K(), d(), h.value = !0;
|
|
361
|
+
}), J(() => n.repeatNum, () => {
|
|
362
|
+
k(), K();
|
|
363
|
+
}), Rt(document, "keydown", _), Vt(c, () => {
|
|
364
|
+
y.value = c.value.getBoundingClientRect().height;
|
|
365
365
|
}), e({
|
|
366
366
|
visible: h,
|
|
367
|
-
bottom:
|
|
368
|
-
close:
|
|
369
|
-
}), (
|
|
370
|
-
name:
|
|
371
|
-
onBeforeEnter: (
|
|
372
|
-
onBeforeLeave:
|
|
373
|
-
onAfterLeave: (
|
|
367
|
+
bottom: G,
|
|
368
|
+
close: x
|
|
369
|
+
}), (p, q) => (P(), ve(xe, {
|
|
370
|
+
name: g(s).b("fade"),
|
|
371
|
+
onBeforeEnter: (R) => a.value = !0,
|
|
372
|
+
onBeforeLeave: p.onClose,
|
|
373
|
+
onAfterLeave: (R) => p.$emit("destroy"),
|
|
374
374
|
persisted: ""
|
|
375
375
|
}, {
|
|
376
|
-
default:
|
|
377
|
-
|
|
378
|
-
id:
|
|
376
|
+
default: j(() => [
|
|
377
|
+
$e(I("div", {
|
|
378
|
+
id: p.id,
|
|
379
379
|
ref_key: "messageRef",
|
|
380
380
|
ref: c,
|
|
381
|
-
class:
|
|
382
|
-
|
|
383
|
-
{ [
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
381
|
+
class: T([
|
|
382
|
+
g(s).b(),
|
|
383
|
+
{ [g(s).m(p.type)]: p.type },
|
|
384
|
+
g(s).is("closable", p.showClose),
|
|
385
|
+
g(s).is("plain", p.plain),
|
|
386
|
+
p.customClass
|
|
387
387
|
]),
|
|
388
|
-
style:
|
|
388
|
+
style: Se(g(E)),
|
|
389
389
|
role: "alert",
|
|
390
|
-
onMouseenter:
|
|
391
|
-
onMouseleave:
|
|
390
|
+
onMouseenter: k,
|
|
391
|
+
onMouseleave: K
|
|
392
392
|
}, [
|
|
393
|
-
|
|
393
|
+
p.repeatNum > 1 ? (P(), ve(g($t), {
|
|
394
394
|
key: 0,
|
|
395
|
-
value:
|
|
396
|
-
type:
|
|
397
|
-
class:
|
|
398
|
-
}, null, 8, ["value", "type", "class"])) :
|
|
399
|
-
|
|
395
|
+
value: p.repeatNum,
|
|
396
|
+
type: g(b),
|
|
397
|
+
class: T(g(s).e("badge"))
|
|
398
|
+
}, null, 8, ["value", "type", "class"])) : Z("v-if", !0),
|
|
399
|
+
g(M) ? (P(), ve(g(Oe), {
|
|
400
400
|
key: 1,
|
|
401
|
-
class:
|
|
401
|
+
class: T([g(s).e("icon"), g(f)])
|
|
402
402
|
}, {
|
|
403
|
-
default:
|
|
404
|
-
(
|
|
403
|
+
default: j(() => [
|
|
404
|
+
(P(), ve(Pt(g(M))))
|
|
405
405
|
]),
|
|
406
406
|
_: 1
|
|
407
|
-
}, 8, ["class"])) :
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
class:
|
|
413
|
-
innerHTML:
|
|
407
|
+
}, 8, ["class"])) : Z("v-if", !0),
|
|
408
|
+
Ce(p.$slots, "default", {}, () => [
|
|
409
|
+
p.dangerouslyUseHTMLString ? (P(), O(fe, { key: 1 }, [
|
|
410
|
+
Z(" Caution here, message could've been compromised, never use user's input as message "),
|
|
411
|
+
I("p", {
|
|
412
|
+
class: T(g(s).e("content")),
|
|
413
|
+
innerHTML: p.message
|
|
414
414
|
}, null, 10, ["innerHTML"])
|
|
415
|
-
], 2112)) : (
|
|
415
|
+
], 2112)) : (P(), O("p", {
|
|
416
416
|
key: 0,
|
|
417
|
-
class:
|
|
418
|
-
},
|
|
417
|
+
class: T(g(s).e("content"))
|
|
418
|
+
}, ie(p.message), 3))
|
|
419
419
|
]),
|
|
420
|
-
|
|
420
|
+
p.showClose ? (P(), ve(g(Oe), {
|
|
421
421
|
key: 2,
|
|
422
|
-
class:
|
|
423
|
-
onClick:
|
|
422
|
+
class: T(g(s).e("closeBtn")),
|
|
423
|
+
onClick: At(x, ["stop"])
|
|
424
424
|
}, {
|
|
425
|
-
default:
|
|
426
|
-
|
|
425
|
+
default: j(() => [
|
|
426
|
+
F(g(o))
|
|
427
427
|
]),
|
|
428
428
|
_: 1
|
|
429
|
-
}, 8, ["class", "onClick"])) :
|
|
429
|
+
}, 8, ["class", "onClick"])) : Z("v-if", !0)
|
|
430
430
|
], 46, ["id"]), [
|
|
431
|
-
[
|
|
431
|
+
[et, h.value]
|
|
432
432
|
])
|
|
433
433
|
]),
|
|
434
434
|
_: 3
|
|
435
435
|
}, 8, ["name", "onBeforeEnter", "onBeforeLeave", "onAfterLeave"]));
|
|
436
436
|
}
|
|
437
437
|
});
|
|
438
|
-
var
|
|
439
|
-
let
|
|
440
|
-
const
|
|
441
|
-
const e = !
|
|
442
|
-
...
|
|
438
|
+
var ln = /* @__PURE__ */ Ze(dn, [["__file", "message.vue"]]);
|
|
439
|
+
let cn = 1;
|
|
440
|
+
const it = (i) => {
|
|
441
|
+
const e = !i || Re(i) || nt(i) || De(i) ? { message: i } : i, t = {
|
|
442
|
+
...N,
|
|
443
443
|
...e
|
|
444
444
|
};
|
|
445
445
|
if (!t.appendTo)
|
|
446
446
|
t.appendTo = document.body;
|
|
447
|
-
else if (
|
|
447
|
+
else if (Re(t.appendTo)) {
|
|
448
448
|
let n = document.querySelector(t.appendTo);
|
|
449
|
-
|
|
449
|
+
Et(n) || (n = document.body), t.appendTo = n;
|
|
450
450
|
}
|
|
451
|
-
return
|
|
452
|
-
},
|
|
453
|
-
const e =
|
|
451
|
+
return ke(z.grouping) && !t.grouping && (t.grouping = z.grouping), ye(z.duration) && t.duration === 3e3 && (t.duration = z.duration), ye(z.offset) && t.offset === 16 && (t.offset = z.offset), ke(z.showClose) && !t.showClose && (t.showClose = z.showClose), ke(z.plain) && !t.plain && (t.plain = z.plain), t;
|
|
452
|
+
}, mn = (i) => {
|
|
453
|
+
const e = H.indexOf(i);
|
|
454
454
|
if (e === -1)
|
|
455
455
|
return;
|
|
456
|
-
|
|
457
|
-
const { handler: t } =
|
|
456
|
+
H.splice(e, 1);
|
|
457
|
+
const { handler: t } = i;
|
|
458
458
|
t.close();
|
|
459
|
-
},
|
|
460
|
-
const n = `message_${
|
|
459
|
+
}, hn = ({ appendTo: i, ...e }, t) => {
|
|
460
|
+
const n = `message_${cn++}`, o = e.onClose, a = document.createElement("div"), s = {
|
|
461
461
|
...e,
|
|
462
462
|
id: n,
|
|
463
463
|
onClose: () => {
|
|
464
|
-
o?.(),
|
|
464
|
+
o?.(), mn(c);
|
|
465
465
|
},
|
|
466
466
|
onDestroy: () => {
|
|
467
|
-
|
|
467
|
+
Te(null, a);
|
|
468
468
|
}
|
|
469
|
-
},
|
|
470
|
-
default:
|
|
469
|
+
}, r = F(ln, s, De(s.message) || nt(s.message) ? {
|
|
470
|
+
default: De(s.message) ? s.message : () => s.message
|
|
471
471
|
} : null);
|
|
472
|
-
|
|
473
|
-
const
|
|
472
|
+
r.appContext = t || le._context, Te(r, a), i.appendChild(a.firstElementChild);
|
|
473
|
+
const l = r.component, c = {
|
|
474
474
|
id: n,
|
|
475
|
-
vnode:
|
|
476
|
-
vm:
|
|
475
|
+
vnode: r,
|
|
476
|
+
vm: l,
|
|
477
477
|
handler: {
|
|
478
478
|
close: () => {
|
|
479
|
-
|
|
479
|
+
l.exposed.close();
|
|
480
480
|
}
|
|
481
481
|
},
|
|
482
|
-
props:
|
|
482
|
+
props: r.component.props
|
|
483
483
|
};
|
|
484
484
|
return c;
|
|
485
|
-
},
|
|
486
|
-
if (!
|
|
485
|
+
}, le = (i = {}, e) => {
|
|
486
|
+
if (!Pe)
|
|
487
487
|
return { close: () => {
|
|
488
488
|
} };
|
|
489
|
-
const t =
|
|
490
|
-
if (t.grouping &&
|
|
491
|
-
const o =
|
|
492
|
-
var
|
|
493
|
-
return ((
|
|
489
|
+
const t = it(i);
|
|
490
|
+
if (t.grouping && H.length) {
|
|
491
|
+
const o = H.find(({ vnode: a }) => {
|
|
492
|
+
var s;
|
|
493
|
+
return ((s = a.props) == null ? void 0 : s.message) === t.message;
|
|
494
494
|
});
|
|
495
495
|
if (o)
|
|
496
496
|
return o.props.repeatNum += 1, o.props.type = t.type, o.handler;
|
|
497
497
|
}
|
|
498
|
-
if (
|
|
498
|
+
if (ye(z.max) && H.length >= z.max)
|
|
499
499
|
return { close: () => {
|
|
500
500
|
} };
|
|
501
|
-
const n =
|
|
502
|
-
return
|
|
501
|
+
const n = hn(t, e);
|
|
502
|
+
return H.push(n), n.handler;
|
|
503
503
|
};
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
const n =
|
|
507
|
-
return
|
|
504
|
+
st.forEach((i) => {
|
|
505
|
+
le[i] = (e = {}, t) => {
|
|
506
|
+
const n = it(e);
|
|
507
|
+
return le({ ...n, type: i }, t);
|
|
508
508
|
};
|
|
509
509
|
});
|
|
510
|
-
function
|
|
511
|
-
const e = [...
|
|
510
|
+
function un(i) {
|
|
511
|
+
const e = [...H];
|
|
512
512
|
for (const t of e)
|
|
513
|
-
(!
|
|
513
|
+
(!i || i === t.props.type) && t.handler.close();
|
|
514
514
|
}
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
const
|
|
518
|
-
class
|
|
515
|
+
le.closeAll = un;
|
|
516
|
+
le._context = null;
|
|
517
|
+
const D = Mt(le, "$message");
|
|
518
|
+
class V extends Ee {
|
|
519
519
|
_renderer;
|
|
520
520
|
get renderer() {
|
|
521
521
|
return this._renderer || (this._renderer = this.parent?.findComponentByName("Renderer")), this._renderer;
|
|
@@ -598,7 +598,7 @@ class T extends ye {
|
|
|
598
598
|
};
|
|
599
599
|
}
|
|
600
600
|
}
|
|
601
|
-
class
|
|
601
|
+
class pn extends V {
|
|
602
602
|
static name = "DrawLine";
|
|
603
603
|
container = new m.Group();
|
|
604
604
|
interruptKeys = ["escape"];
|
|
@@ -615,29 +615,29 @@ class hn extends T {
|
|
|
615
615
|
* @param next
|
|
616
616
|
*/
|
|
617
617
|
selectPoint(e) {
|
|
618
|
-
let t = this.parent?.findComponentByName("Editor"), n = null, o = null,
|
|
618
|
+
let t = this.parent?.findComponentByName("Editor"), n = null, o = null, a = [], s = new m.Mesh(new m.SphereGeometry(0.05), new m.MeshBasicMaterial({ color: 65280 })), r = t.domContainer.domElement, l = new we([], 16711935), d = new we([
|
|
619
619
|
new m.Vector3(-1e4, 0, 0),
|
|
620
620
|
new m.Vector3(1e4, 0, 0),
|
|
621
621
|
new m.Vector3(0, -1e4, 0),
|
|
622
622
|
new m.Vector3(0, 1e4, 0)
|
|
623
623
|
], 16711935);
|
|
624
|
-
|
|
624
|
+
d.material = new m.LineDashedMaterial({
|
|
625
625
|
color: 4235007,
|
|
626
626
|
dashSize: 0.1,
|
|
627
627
|
gapSize: 0.1,
|
|
628
628
|
linewidth: 0.1
|
|
629
|
-
}), this.container.add(
|
|
629
|
+
}), this.container.add(l);
|
|
630
630
|
const c = () => {
|
|
631
|
-
|
|
631
|
+
l.setPoint(...a, n, o), d.position.copy(o), this.container.add(d), d.computeLineDistances();
|
|
632
632
|
}, h = new m.Vector3();
|
|
633
633
|
this.addEventRecord(
|
|
634
634
|
"clear",
|
|
635
635
|
t.addEventListener("pointerPositionChange", () => {
|
|
636
|
-
const { point:
|
|
637
|
-
if (this.dispatchEvent({ type: "pointerMove", point:
|
|
636
|
+
const { point: y, find: w } = t.renderManager.adsorption();
|
|
637
|
+
if (this.dispatchEvent({ type: "pointerMove", point: y }), w ? (s.position.set(y.x, y.y, 0), this.container.add(s), r.style.cursor = "none") : (s.removeFromParent(), r.style.cursor = "crosshair"), h.copy(y), !!(n && o)) {
|
|
638
638
|
if (t.eventInput.isKeyDown("shift")) {
|
|
639
|
-
const
|
|
640
|
-
|
|
639
|
+
const b = Math.abs(t.pointerPosition.x - n.x), f = Math.abs(t.pointerPosition.y - n.y);
|
|
640
|
+
b > f ? o.set(t.pointerPosition.x, n.y, 0) : o.set(n.x, t.pointerPosition.y, 0), c(), h.copy(o);
|
|
641
641
|
return;
|
|
642
642
|
}
|
|
643
643
|
o.set(t.pointerPosition.x, t.pointerPosition.y, 0), c();
|
|
@@ -649,16 +649,16 @@ class hn extends T {
|
|
|
649
649
|
n = h.clone(), o = h.clone(), c();
|
|
650
650
|
return;
|
|
651
651
|
}
|
|
652
|
-
o = h.clone(),
|
|
652
|
+
o = h.clone(), a.push(n.clone(), o.clone()), n.copy(o), c();
|
|
653
653
|
} else if (t.eventInput.isOnlyKeyDowns(this.withdrawalKeys)) {
|
|
654
|
-
if (
|
|
655
|
-
const { point:
|
|
656
|
-
|
|
654
|
+
if (a.length) {
|
|
655
|
+
const { point: y } = t.renderManager.adsorption();
|
|
656
|
+
a.pop(), o?.copy(y), n?.copy(a.pop()), c();
|
|
657
657
|
}
|
|
658
|
-
} else t.eventInput.isKeyDowns(this.confirmKeys) && e(
|
|
658
|
+
} else t.eventInput.isKeyDowns(this.confirmKeys) && e(a);
|
|
659
659
|
}),
|
|
660
660
|
function() {
|
|
661
|
-
|
|
661
|
+
l.removeFromParent(), s.removeFromParent(), d.removeFromParent();
|
|
662
662
|
}
|
|
663
663
|
);
|
|
664
664
|
}
|
|
@@ -668,7 +668,7 @@ class hn extends T {
|
|
|
668
668
|
end(e, t) {
|
|
669
669
|
const n = [];
|
|
670
670
|
for (let o = 0; o < t.length; o += 2)
|
|
671
|
-
n.push(new
|
|
671
|
+
n.push(new ce(W.from(t[o]), W.from(t[o + 1])));
|
|
672
672
|
e(n);
|
|
673
673
|
}
|
|
674
674
|
/** 执行完成
|
|
@@ -690,7 +690,7 @@ class hn extends T {
|
|
|
690
690
|
return this.completed(e), e;
|
|
691
691
|
}
|
|
692
692
|
}
|
|
693
|
-
class
|
|
693
|
+
class Be extends Ee {
|
|
694
694
|
static name = "Default";
|
|
695
695
|
get editor() {
|
|
696
696
|
return this.parent?.findComponentByName("Editor");
|
|
@@ -748,63 +748,69 @@ class ke extends ye {
|
|
|
748
748
|
*/
|
|
749
749
|
start() {
|
|
750
750
|
const e = this.editor, t = e.eventInput, n = new m.Mesh(), o = e.domContainer.domElement;
|
|
751
|
-
let
|
|
751
|
+
let a = null;
|
|
752
752
|
n.position.z = 1e-3, this.selectLineObject3D.position.z = n.position.z + 1e-3, n.material = new m.MeshBasicMaterial({ color: 55561 });
|
|
753
|
-
const
|
|
754
|
-
const
|
|
755
|
-
this.container.add(
|
|
753
|
+
const s = () => {
|
|
754
|
+
const r = e.pointerPosition.clone(), l = e.pointerPosition.clone(), d = new m.Mesh();
|
|
755
|
+
this.container.add(d), d.position.z = 0.05, d.material = new m.MeshBasicMaterial({
|
|
756
756
|
color: 16777215,
|
|
757
757
|
transparent: !0,
|
|
758
758
|
opacity: 0.5
|
|
759
759
|
});
|
|
760
760
|
const c = () => {
|
|
761
|
-
const
|
|
762
|
-
|
|
763
|
-
|
|
761
|
+
const w = Math.min(r.x, l.x), b = Math.max(r.x, l.x), f = Math.min(r.y, l.y), M = Math.max(r.y, l.y), L = [
|
|
762
|
+
w,
|
|
763
|
+
M,
|
|
764
764
|
0,
|
|
765
|
-
C,
|
|
766
765
|
b,
|
|
766
|
+
f,
|
|
767
767
|
0,
|
|
768
|
-
|
|
769
|
-
|
|
768
|
+
b,
|
|
769
|
+
M,
|
|
770
770
|
0,
|
|
771
|
-
|
|
772
|
-
|
|
771
|
+
w,
|
|
772
|
+
M,
|
|
773
773
|
0,
|
|
774
|
-
|
|
775
|
-
|
|
774
|
+
w,
|
|
775
|
+
f,
|
|
776
776
|
0,
|
|
777
|
-
C,
|
|
778
777
|
b,
|
|
778
|
+
f,
|
|
779
779
|
0
|
|
780
780
|
];
|
|
781
|
-
|
|
781
|
+
d.geometry = e.renderManager.createGeometry({ position: L }, L.length / 3);
|
|
782
782
|
}, h = () => {
|
|
783
|
-
|
|
784
|
-
},
|
|
785
|
-
document.removeEventListener("mousemove", h), document.removeEventListener("mouseup",
|
|
786
|
-
const
|
|
787
|
-
this.removeSelectLineAll(),
|
|
783
|
+
l.copy(e.pointerPosition), c();
|
|
784
|
+
}, y = () => {
|
|
785
|
+
document.removeEventListener("mousemove", h), document.removeEventListener("mouseup", y), d.removeFromParent();
|
|
786
|
+
const w = Math.min(r.x, l.x), b = Math.max(r.x, l.x), f = Math.min(r.y, l.y), M = Math.max(r.y, l.y), L = new Ye(w, b, f, M), A = e.renderManager.quadtree.queryBox(L);
|
|
787
|
+
this.removeSelectLineAll(), A.forEach((G) => this.addSelectLine(G.line)), this.updateSelectLinesGeometry();
|
|
788
788
|
};
|
|
789
|
-
document.addEventListener("mousemove", h), document.addEventListener("mouseup",
|
|
789
|
+
document.addEventListener("mousemove", h), document.addEventListener("mouseup", y);
|
|
790
790
|
};
|
|
791
791
|
this.addEventRecord(
|
|
792
792
|
"clear",
|
|
793
793
|
// 注册鼠标指针位置变化事件
|
|
794
794
|
e.addEventListener("pointerPositionChange", () => {
|
|
795
|
-
const { line:
|
|
796
|
-
if (
|
|
797
|
-
const
|
|
798
|
-
n.geometry = e.renderManager.createGeometry({ position:
|
|
795
|
+
const { line: r } = e.renderManager.adsorption(0.04);
|
|
796
|
+
if (r) {
|
|
797
|
+
const l = r.expandToRectangle(0.025, "bothSides");
|
|
798
|
+
n.geometry = e.renderManager.createGeometry({ position: l.createGeometry() }, 6), this.container.add(n), o.style.cursor = "pointer", a = r;
|
|
799
799
|
} else
|
|
800
|
-
n.removeFromParent(), o.style.cursor = "default",
|
|
800
|
+
n.removeFromParent(), o.style.cursor = "default", a = null;
|
|
801
801
|
}),
|
|
802
802
|
t.addEventListener("codeChange", () => {
|
|
803
803
|
if (t.isKeyDown("mouse_0")) {
|
|
804
|
-
if (!
|
|
804
|
+
if (!a) return s();
|
|
805
805
|
if (t.isKeyDown("alt"))
|
|
806
|
-
return this.removeSelectLine(
|
|
807
|
-
t.isKeyDown("control") || this.removeSelectLineAll(), this.addSelectLine(
|
|
806
|
+
return this.removeSelectLine(a);
|
|
807
|
+
t.isKeyDown("control") || this.removeSelectLineAll(), this.addSelectLine(a);
|
|
808
|
+
} else if (t.isKeyDown("mouse_1")) {
|
|
809
|
+
if (!a) return;
|
|
810
|
+
this.removeSelectLine(a);
|
|
811
|
+
} else if (t.isKeyDown("mouse_2")) {
|
|
812
|
+
if (!a) return;
|
|
813
|
+
this.addSelectLine(a);
|
|
808
814
|
} else t.isKeyDowns(["control", "z"]) ? e.commandManager.rollback() : t.isKeyDowns(["control", "y"]) && e.commandManager.revokeRollback();
|
|
809
815
|
}),
|
|
810
816
|
function() {
|
|
@@ -819,7 +825,7 @@ class ke extends ye {
|
|
|
819
825
|
this.canceEventRecord("clear"), this.removeSelectLineAll(), this.updateSelectLinesGeometry();
|
|
820
826
|
}
|
|
821
827
|
}
|
|
822
|
-
class
|
|
828
|
+
class gn extends Xe {
|
|
823
829
|
list = [];
|
|
824
830
|
rollbacklist = [];
|
|
825
831
|
revokeRollbacklist = [];
|
|
@@ -847,7 +853,7 @@ class un extends Ue {
|
|
|
847
853
|
return this.revokeRollbacklist.push(e), this;
|
|
848
854
|
}
|
|
849
855
|
}
|
|
850
|
-
class
|
|
856
|
+
class vn extends Xe {
|
|
851
857
|
commandFlowMap = /* @__PURE__ */ new Map();
|
|
852
858
|
lock = !1;
|
|
853
859
|
abortController = null;
|
|
@@ -874,7 +880,7 @@ class pn extends Ue {
|
|
|
874
880
|
*/
|
|
875
881
|
addCommandFlow(e) {
|
|
876
882
|
if (this.commandFlowMap.has(e)) throw new Error(`${e} 命令已经存在`);
|
|
877
|
-
const t = new
|
|
883
|
+
const t = new gn();
|
|
878
884
|
return this.commandFlowMap.set(e, t), t;
|
|
879
885
|
}
|
|
880
886
|
executionPromise = null;
|
|
@@ -896,18 +902,18 @@ class pn extends Ue {
|
|
|
896
902
|
throw new Error(`命令流 ${e} 不存在`);
|
|
897
903
|
this.lock = !0, this.abortController = new AbortController(), this.currentName = e, o.dispatchEvent({ type: "started" }), this.dispatchEvent({ type: "started", name: e });
|
|
898
904
|
try {
|
|
899
|
-
for (let
|
|
900
|
-
const
|
|
901
|
-
if (o.dispatchEvent({ type: "executing", index:
|
|
902
|
-
this.resolve =
|
|
905
|
+
for (let a = n; a < o.list.length; a++) {
|
|
906
|
+
const s = o.list[a];
|
|
907
|
+
if (o.dispatchEvent({ type: "executing", index: a }), this.dispatchEvent({ type: "executing", name: e, index: a }), t = await new Promise((r) => {
|
|
908
|
+
this.resolve = r, s(r, t);
|
|
903
909
|
}), this.abortController.signal.aborted) {
|
|
904
|
-
o.dispatchEvent({ type: "executionInterrupt", index:
|
|
910
|
+
o.dispatchEvent({ type: "executionInterrupt", index: a }), this.dispatchEvent({ type: "executionInterrupt", name: e, index: a }), this.dispatchEvent({ type: "cancel", name: e });
|
|
905
911
|
break;
|
|
906
912
|
} else
|
|
907
|
-
o.dispatchEvent({ type: "executionCompleted", index:
|
|
913
|
+
o.dispatchEvent({ type: "executionCompleted", index: a, data: t }), this.dispatchEvent({ type: "executionCompleted", name: e, index: a, data: t });
|
|
908
914
|
}
|
|
909
|
-
} catch (
|
|
910
|
-
console.error(
|
|
915
|
+
} catch (a) {
|
|
916
|
+
console.error(a);
|
|
911
917
|
} finally {
|
|
912
918
|
this.abortController && !this.abortController.signal.aborted && (o.dispatchEvent({ type: "completed", data: t }), this.dispatchEvent({ type: "completed", name: e, data: t }), o.writeOperationList && (this.operationList.push({ name: e, data: t }), this.rollbackList.length = 0)), this.lock = !1, this.abortController = null, this.currentName = null, o.dispatchEvent({ type: "finally" }), this.dispatchEvent({ type: "finally", name: e }), this.executionResolve && (this.executionResolve(null), this.executionResolve = null);
|
|
913
919
|
}
|
|
@@ -927,7 +933,7 @@ class pn extends Ue {
|
|
|
927
933
|
if (!e) return !1;
|
|
928
934
|
const t = this.commandFlowMap.get(e.name);
|
|
929
935
|
if (!t) return !1;
|
|
930
|
-
const n = t.rollbacklist.reduce((o,
|
|
936
|
+
const n = t.rollbacklist.reduce((o, a) => a(o), e.data);
|
|
931
937
|
return this.dispatchEvent({ type: "rollback", name: e.name }), this.rollbackList.push({
|
|
932
938
|
data: n,
|
|
933
939
|
name: e.name
|
|
@@ -945,60 +951,64 @@ class pn extends Ue {
|
|
|
945
951
|
if (!e) return !1;
|
|
946
952
|
const t = this.commandFlowMap.get(e.name);
|
|
947
953
|
if (!t) return !1;
|
|
948
|
-
const n = t.revokeRollbacklist.reduce((o,
|
|
954
|
+
const n = t.revokeRollbacklist.reduce((o, a) => a(o), e.data);
|
|
949
955
|
return this.dispatchEvent({ type: "revokeRollback", name: e.name }), this.operationList.push({ name: e.name, data: n }), !0;
|
|
950
956
|
} catch (e) {
|
|
951
957
|
throw new Error(`撤回回滚失败:${e}`);
|
|
952
958
|
}
|
|
953
959
|
}
|
|
954
960
|
}
|
|
955
|
-
const
|
|
956
|
-
__proto__: null,
|
|
957
|
-
default: vn
|
|
958
|
-
}, Symbol.toStringTag, { value: "Module" })), gn = "data:image/svg+xml,%3csvg%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20fill='%23555'%20width='16'%20height='16'%3e%3cpath%20d='M909.050991%20169.476903l-217.554898%200%200-31.346939c0-39.5866-32.205493-71.792093-71.793116-71.792093L408.15591%2066.337871c-39.5866%200-71.792093%2032.205493-71.792093%2071.792093l0%2031.346939L113.349581%20169.476903c-11.013845%200-19.942191%208.940626-19.942191%2019.954471s8.928347%2019.954471%2019.942191%2019.954471l84.264149%200%200%20640.687918c0%2060.479443%2049.203632%20109.683075%20109.683075%20109.683075l416.474366%200c60.479443%200%20109.683075-49.203632%20109.683075-109.683075L833.454246%20209.385844l75.595722%200c11.012821%200%2019.942191-8.940626%2019.942191-19.954471S920.063813%20169.476903%20909.050991%20169.476903zM376.2482%20138.130987c0-17.593703%2014.314007-31.907711%2031.907711-31.907711l211.547067%200c17.593703%200%2031.907711%2014.314007%2031.907711%2031.907711l0%2031.346939L376.2482%20169.477926%20376.2482%20138.130987zM793.569864%20850.074785c0%2038.486546-31.312146%2069.798692-69.798692%2069.798692L307.297828%20919.873478c-38.486546%200-69.798692-31.312146-69.798692-69.798692L237.499136%20211.042577l556.070728%200L793.569864%20850.074785zM510.662539%20861.276918c11.012821%200%2019.954471-8.92937%2019.954471-19.942191L530.61701%20294.912753c0-11.013845-8.94165-19.942191-19.954471-19.942191s-19.954471%208.928347-19.954471%2019.942191L490.708068%20841.334727C490.708068%20852.347548%20499.649717%20861.276918%20510.662539%20861.276918zM374.562814%20801.449321c11.012821%200%2019.954471-8.92937%2019.954471-19.942191L394.517285%20354.74035c0-11.013845-8.94165-19.942191-19.954471-19.942191s-19.954471%208.928347-19.954471%2019.942191l0%20426.76678C354.608344%20792.519951%20363.549993%20801.449321%20374.562814%20801.449321zM649.832182%20801.449321c11.012821%200%2019.954471-8.92937%2019.954471-19.942191L669.786653%20354.74035c0-11.013845-8.94165-19.942191-19.954471-19.942191s-19.954471%208.928347-19.954471%2019.942191l0%20426.76678C629.877711%20792.519951%20638.81936%20801.449321%20649.832182%20801.449321z'%20%3e%3c/path%3e%3c/svg%3e", yn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
961
|
+
const fn = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='5569'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20fill='%23555'%20width='16'%20height='16'%3e%3cpath%20d='M522.1888%20811.3152a412.1088%20412.1088%200%200%200-114.5344-269.7728l-244.48%20269.7728h359.0144zM450.816%20493.824c83.5072%2085.3504%20132.7104%20197.4784%20136.5504%20317.4912h417.5872v63.232H18.9952L676.1472%20149.4016l48.9472%2041.7792-274.2784%20302.6432z'%20%3e%3c/path%3e%3c/svg%3e", yn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
959
962
|
__proto__: null,
|
|
960
|
-
default:
|
|
961
|
-
}, Symbol.toStringTag, { value: "Module" })), wn = "data:image/svg+xml,%3csvg%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20fill='%23555'%20width='16'%20height='16'%3e%3cpath%20d='
|
|
963
|
+
default: fn
|
|
964
|
+
}, Symbol.toStringTag, { value: "Module" })), wn = "data:image/svg+xml,%3csvg%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20fill='%23555'%20width='16'%20height='16'%3e%3cpath%20d='M639.999191%20893.597594c-0.999994-54.699654-36.39977-101.099361-85.39946-118.399252-6.39996-2.199986-10.599933-8.299948-10.599933-14.999905V263.801573c0-6.699958%204.199973-12.799919%2010.599933-14.999905%2049.09969-17.299891%2084.399467-63.599598%2085.39946-118.399252C641.299183%2059.902862%20583.399549%200.503237%20512.899994%200.00324%20441.800444-0.496757%20384.000809%2057.00288%20384.000809%20128.002431c0%2055.699648%2035.599775%20103.099349%2085.299461%20120.699238%206.39996%202.299985%2010.699932%208.299948%2010.699932%2015.099904v496.396864c0%206.799957-4.299973%2012.799919-10.699932%2015.099904-49.699686%2017.599889-85.299461%2064.999589-85.299461%20120.699238%200%2070.999551%2057.799635%20128.499188%20128.899185%20127.999191%2070.499555-0.499997%20128.399189-59.899622%20127.099197-130.399176zM448.000404%20128.002431c0-35.299777%2028.699819-63.999596%2063.999596-63.999595s63.999596%2028.699819%2063.999596%2063.999595-28.699819%2063.999596-63.999596%2063.999596-63.999596-28.699819-63.999596-63.999596z%20m0%20767.995148c0-35.299777%2028.699819-63.999596%2063.999596-63.999596s63.999596%2028.699819%2063.999596%2063.999596-28.699819%2063.999596-63.999596%2063.999595-63.999596-28.699819-63.999596-63.999595z'%3e%3c/path%3e%3c/svg%3e", bn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
962
965
|
__proto__: null,
|
|
963
966
|
default: wn
|
|
964
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
967
|
+
}, Symbol.toStringTag, { value: "Module" })), Cn = "data:image/svg+xml,%3csvg%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20fill='%23555'%20width='16'%20height='16'%3e%3cpath%20d='M909.050991%20169.476903l-217.554898%200%200-31.346939c0-39.5866-32.205493-71.792093-71.793116-71.792093L408.15591%2066.337871c-39.5866%200-71.792093%2032.205493-71.792093%2071.792093l0%2031.346939L113.349581%20169.476903c-11.013845%200-19.942191%208.940626-19.942191%2019.954471s8.928347%2019.954471%2019.942191%2019.954471l84.264149%200%200%20640.687918c0%2060.479443%2049.203632%20109.683075%20109.683075%20109.683075l416.474366%200c60.479443%200%20109.683075-49.203632%20109.683075-109.683075L833.454246%20209.385844l75.595722%200c11.012821%200%2019.942191-8.940626%2019.942191-19.954471S920.063813%20169.476903%20909.050991%20169.476903zM376.2482%20138.130987c0-17.593703%2014.314007-31.907711%2031.907711-31.907711l211.547067%200c17.593703%200%2031.907711%2014.314007%2031.907711%2031.907711l0%2031.346939L376.2482%20169.477926%20376.2482%20138.130987zM793.569864%20850.074785c0%2038.486546-31.312146%2069.798692-69.798692%2069.798692L307.297828%20919.873478c-38.486546%200-69.798692-31.312146-69.798692-69.798692L237.499136%20211.042577l556.070728%200L793.569864%20850.074785zM510.662539%20861.276918c11.012821%200%2019.954471-8.92937%2019.954471-19.942191L530.61701%20294.912753c0-11.013845-8.94165-19.942191-19.954471-19.942191s-19.954471%208.928347-19.954471%2019.942191L490.708068%20841.334727C490.708068%20852.347548%20499.649717%20861.276918%20510.662539%20861.276918zM374.562814%20801.449321c11.012821%200%2019.954471-8.92937%2019.954471-19.942191L394.517285%20354.74035c0-11.013845-8.94165-19.942191-19.954471-19.942191s-19.954471%208.928347-19.954471%2019.942191l0%20426.76678C354.608344%20792.519951%20363.549993%20801.449321%20374.562814%20801.449321zM649.832182%20801.449321c11.012821%200%2019.954471-8.92937%2019.954471-19.942191L669.786653%20354.74035c0-11.013845-8.94165-19.942191-19.954471-19.942191s-19.954471%208.928347-19.954471%2019.942191l0%20426.76678C629.877711%20792.519951%20638.81936%20801.449321%20649.832182%20801.449321z'%20%3e%3c/path%3e%3c/svg%3e", xn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
965
968
|
__proto__: null,
|
|
966
|
-
default:
|
|
967
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
969
|
+
default: Cn
|
|
970
|
+
}, Symbol.toStringTag, { value: "Module" })), En = "data:image/svg+xml,%3csvg%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20fill='%23555'%20width='16'%20height='16'%3e%3cpath%20d='M220.451548%20913.518482V318.145854c0-27.62038%2022.505495-50.125874%2050.125875-50.125874H865.95005c27.62038%200%2050.125874%2022.505495%2050.125874%2050.125874v218.917083h59.332667V318.145854c0-60.355644-49.102897-109.458541-109.458541-109.458541h-39.896104v-99.228772C826.053946%2049.102897%20776.951049%200%20716.595405%200H121.222777C60.867133%200%2011.764236%2049.102897%2011.764236%20109.458541V705.854146c0%2060.355644%2049.102897%20109.458541%20109.458541%20109.458541h39.896104v99.228772c0%2060.355644%2049.102897%20109.458541%20109.458542%20109.458541h257.790209v-59.332667H269.554446c-26.597403-1.022977-49.102897-23.528472-49.102898-51.148851z%20m-59.332667-595.372628v436.811189h-39.896104c-27.62038%200-50.125874-22.505495-50.125874-50.125874V109.458541c0-27.62038%2022.505495-50.125874%2050.125874-50.125874H716.595405c27.62038%200%2050.125874%2022.505495%2050.125874%2050.125874v99.228772H269.554446c-59.332667%200-108.435564%2049.102897-108.435565%20109.458541z'%20%3e%3c/path%3e%3cpath%20d='M902.777223%20854.185814l98.205794-98.205794c15.344655-15.344655%2015.344655-40.919081%200-56.263736s-40.919081-15.344655-56.263736%200L846.513487%20797.922078%20747.284715%20699.716284c-15.344655-15.344655-40.919081-15.344655-56.263736%200s-15.344655%2040.919081%200%2056.263736l98.205794%2098.205794-98.205794%2098.205794c-15.344655%2015.344655-15.344655%2040.919081%200%2056.263737s40.919081%2015.344655%2056.263736%200l98.205794-98.205795%2098.205795%2098.205795c15.344655%2015.344655%2040.919081%2015.344655%2056.263736%200s15.344655-40.919081%200-56.263737l-97.182817-98.205794z'%20%3e%3c/path%3e%3c/svg%3e", Mn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
968
971
|
__proto__: null,
|
|
969
|
-
default:
|
|
970
|
-
}, Symbol.toStringTag, { value: "Module" })), Ln = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='
|
|
972
|
+
default: En
|
|
973
|
+
}, Symbol.toStringTag, { value: "Module" })), Ln = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1757902601497'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='9801'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='200'%20height='200'%3e%3cpath%20d='M761.344%20119.296H226.816c-18.944%200-39.424%2011.776-39.424%2030.72V921.6h614.4V148.48c0.512-18.944-22.016-29.184-40.448-29.184z%20m-537.6%20768c-2.048%200-2.048%200%200%200L221.696%20163.84c0-5.12%205.12-10.24%2010.24-10.24h522.24c8.704%200%2013.824%205.12%2013.824%2013.824v720.384s0%201.536-1.536%201.536h-15.36V194.56c0-16.896-8.704-24.064-29.184-24.064H266.24c-18.944%200-27.136%208.704-27.136%2024.064v692.736h-15.36z%20m49.152%200V204.8H716.8v682.496H272.896z'%20p-id='9802'%3e%3c/path%3e%3cpath%20d='M648.704%20508.416c-16.896%200-32.256%2013.824-32.256%2032.256%200%2016.896%2013.824%2032.256%2032.256%2032.256s32.256-13.824%2032.256-32.256c0-16.896-13.824-32.256-32.256-32.256z'%20p-id='9803'%3e%3c/path%3e%3c/svg%3e", kn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
971
974
|
__proto__: null,
|
|
972
975
|
default: Ln
|
|
973
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
976
|
+
}, Symbol.toStringTag, { value: "Module" })), In = "data:image/svg+xml,%3csvg%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20fill='%23555'%20width='16'%20height='16'%3e%3cpath%20d='M491.80027198%20557.44938977c-10.0998647-15.14979706-20.19972802-25.24966037-35.34952507-35.34952507-15.14979706-10.0998647-30.29959271-15.14979706-50.49932211-15.14979704-55.54925309%200-100.99864286%2045.44938977-100.99864287%20100.99864285%200%2015.14979706%205.04993234%2035.34952507%2015.14979568%2050.49932212%2010.0998647%2015.14979706%2020.19972802%2030.29959271%2035.34952506%2035.34952508%2015.14979706%2010.0998647%2035.34952507%2015.14979706%2050.49932213%2015.14979567%2055.54925309%200%20100.99864286-45.44938977%20100.99864286-100.99864287%200-15.14979706-5.04993234-35.34952507-15.14979568-50.49932074z%20m-85.84884718%20100.99864286h-15.14979706c-20.19972802-5.04993234-30.29959271-20.19972802-35.34952507-35.34952507V612.99864286c0-30.29959271%2025.24966037-50.49932212%2050.49932213-50.49932074h10.09986469c15.14979706%205.04993234%2030.29959271%2015.14979706%2035.34952507%2035.34952507v15.14979567c5.04993234%2025.24966037-20.19972802%2045.44938977-45.44938976%2045.44938977z'%3e%3c/path%3e%3cpath%20d='M390.80162774%20658.44803263l-40.39945604%2040.39945743-227.24694747%20222.19701373-35.34952506-35.34952508%20227.24694745-227.24694608%2040.39945605-40.39945743c5.04993234%2020.19972802%2020.19972802%2035.34952507%2035.34952507%2040.39945743zM648.34816793%20405.9514248l-40.39945742%2040.3994574-116.14843853%20116.14843992-40.39945742%2035.34952507c-5.04993234-20.19972802-20.19972802-30.29959271-35.34952507-35.34952507l40.39945742-40.39945742%20116.14843853-111.09850756%2035.34952507-35.34952507c10.0998647%2015.14979706%2020.19972802%2025.24966037%2040.39945742%2030.29959273zM926.09443614%20133.25508894L749.34681078%20310.00271428l-40.3994574%2040.39945742c-5.04993234-20.19972802-15.14979706-35.34952507-30.29959272-40.39945742l35.34952506-40.39945742%20176.74762534-176.74762535%2035.34952508%2040.39945743z'%20%3e%3c/path%3e%3cpath%20d='M749.34681078%20310.00271428c-10.0998647-15.14979706-20.19972802-30.29959271-35.34952506-35.34952506-15.14979706-10.0998647-35.34952507-15.14979706-55.54925309-15.14979706-55.54925309%200-100.99864286%2045.44938977-100.99864286%20100.99864286%200%2020.19972802%205.04993234%2040.39945743%2015.14979567%2055.54925447%2010.0998647%2015.14979706%2020.19972802%2025.24966037%2035.34952507%2035.34952507%2015.14979706%2010.0998647%2030.29959271%2015.14979706%2050.49932212%2015.14979567%2055.54925309%200%20100.99864286-45.44938977%20100.99864286-100.99864286%200-25.24966037-5.04993234-40.39945743-10.09986471-55.54925309z%20m-90.89877815%2095.94871052h-10.0998647c-20.19972802-5.04993234-35.34952507-15.14979706-40.39945742-35.34952509%200-5.04993234-5.04993234-10.0998647-5.04993234-15.14979704%200-30.29959271%2025.24966037-50.49932212%2050.49932212-50.49932074%205.04993234%200%2010.0998647%200%2015.14979704%205.04993235%2015.14979706%205.04993234%2030.29959271%2020.19972802%2030.29959273%2040.39945742v10.09986332c10.0998647%2025.24966037-15.14979706%2045.44938977-40.39945743%2045.44938978z'%20%3e%3c/path%3e%3c/svg%3e", Dn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
974
977
|
__proto__: null,
|
|
975
|
-
default:
|
|
976
|
-
}, Symbol.toStringTag, { value: "Module" })), Pn = "data:image/svg+xml,%3csvg%20viewBox='0%200%
|
|
978
|
+
default: In
|
|
979
|
+
}, Symbol.toStringTag, { value: "Module" })), Pn = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1757902422799'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='1735'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='200'%20height='200'%3e%3cpath%20d='M843.2%20726.4c-20.2%200-39.2%205.2-55.8%2014.3L283.8%20237.2c9-16.5%2014.1-35.4%2014.1-55.5%200-64.2-52.3-116.5-116.5-116.5S65%20117.4%2065%20181.6s52.3%20116.5%20116.5%20116.5c20.2%200%2039.2-5.2%2055.8-14.2l503.5%20503.5c-9%2016.5-14.1%2035.4-14.1%2055.5%200%2064.2%2052.3%20116.5%20116.5%20116.5s116.5-52.3%20116.5-116.5-52.3-116.5-116.5-116.5zM181.4%20232.1c-27.8%200-50.5-22.6-50.5-50.5s22.6-50.5%2050.5-50.5%2050.5%2022.6%2050.5%2050.5-22.6%2050.5-50.5%2050.5z%20m661.8%20661.3c-27.8%200-50.5-22.6-50.5-50.5%200-27.8%2022.6-50.5%2050.5-50.5s50.5%2022.6%2050.5%2050.5c0%2027.8-22.7%2050.5-50.5%2050.5z'%20fill='%23231815'%20p-id='1736'%3e%3c/path%3e%3c/svg%3e", An = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
977
980
|
__proto__: null,
|
|
978
981
|
default: Pn
|
|
979
|
-
}, Symbol.toStringTag, { value: "Module" })), Sn = "data:image/svg+xml,%3csvg%20viewBox='0%200%
|
|
982
|
+
}, Symbol.toStringTag, { value: "Module" })), Sn = "data:image/svg+xml,%3csvg%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20fill='%23555'%20width='16'%20height='16'%3e%3cpath%20d='M114.176%2046.528h618.496c37.312%200.064%2067.584%2030.336%2067.648%2067.648v618.56c0%2037.248-30.336%2067.584-67.648%2067.584H114.176A67.776%2067.776%200%200%201%2046.528%20732.8V114.176c0-37.312%2030.336-67.648%2067.648-67.648z%20m2.176%20686.208l616.32-2.24-2.176-616.32-614.144%202.176v616.32zM907.648%20291.2l2.176%20616.32H291.264a34.88%2034.88%200%201%200%200%2069.888h618.56c37.312%200%2067.648-30.336%2067.648-67.648V291.264a34.88%2034.88%200%201%200-69.824%200z'%20%3e%3c/path%3e%3c/svg%3e", Bn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
980
983
|
__proto__: null,
|
|
981
984
|
default: Sn
|
|
982
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
985
|
+
}, Symbol.toStringTag, { value: "Module" })), _n = "data:image/svg+xml,%3csvg%20viewBox='0%200%201029%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20fill='%23555'%20width='16'%20height='16'%3e%3cpath%20d='M788.17984%2016l-55.424%2060.672%20116.48%20106.56H418.13184a410.816%20410.816%200%201%200%200%20821.632h547.712v-82.176H418.13184a328.64%20328.64%200%200%201%200-657.28l441.792-0.128-124.8%2098.368%2050.752%2064.512%20243.328-191.488L788.17984%2016z'%3e%3c/path%3e%3c/svg%3e", Nn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
986
|
+
__proto__: null,
|
|
987
|
+
default: _n
|
|
988
|
+
}, Symbol.toStringTag, { value: "Module" })), On = "data:image/svg+xml,%3csvg%20viewBox='0%200%201048%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20fill='%23555'%20width='16'%20height='16'%3e%3cpath%20d='M310.04722%20451.334244A49.95122%2049.95122%200%200%201%20239.416195%20521.990244L27.473171%20310.04722a49.95122%2049.95122%200%200%201%200-70.631025L239.416195%2027.473171a49.95122%2049.95122%200%200%201%2070.631025%2070.631024l-126.651318%20126.626342L649.365854%20224.780488c220.709463%200%20399.609756%20178.900293%20399.609756%20399.609756s-178.900293%20399.609756-399.609756%20399.609756H124.878049a49.95122%2049.95122%200%201%201%200-99.902439h524.487805c165.513366%200%20299.707317-134.193951%20299.707317-299.707317s-134.193951-299.707317-299.707317-299.707317H183.395902l126.651318%20126.651317z'%3e%3c/path%3e%3c/svg%3e", Rn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
983
989
|
__proto__: null,
|
|
984
990
|
default: On
|
|
985
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
991
|
+
}, Symbol.toStringTag, { value: "Module" })), Kn = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='11576'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20fill='%23555'%20width='16'%20height='16'%3e%3cpath%20d='M102.4%20302.08c5.12%205.12%2015.36%2010.24%2025.6%2010.24s15.36-5.12%2025.6-10.24l174.08-174.08c5.12-5.12%2010.24-15.36%2010.24-25.6s-5.12-15.36-10.24-25.6c-20.48-5.12-40.96-5.12-51.2%2010.24l-148.48%20153.6-71.68-76.8C51.2%20158.72%2040.96%20158.72%2035.84%20158.72c-10.24%200-15.36%205.12-25.6%2010.24-5.12%205.12-10.24%2010.24-10.24%2020.48s5.12%2015.36%2010.24%2025.6L102.4%20302.08zM276.48%20409.6l-148.48%20153.6-71.68-71.68C51.2%20486.4%2040.96%20481.28%2035.84%20481.28c-10.24%200-15.36%205.12-25.6%2010.24-5.12%2010.24-10.24%2015.36-10.24%2025.6s5.12%2015.36%2010.24%2025.6L102.4%20629.76c5.12%205.12%2015.36%2010.24%2025.6%2010.24s15.36-5.12%2025.6-10.24L322.56%20460.8c5.12-5.12%2010.24-15.36%2010.24-25.6s-5.12-15.36-10.24-25.6c-10.24-10.24-30.72-10.24-46.08%200z%20m0%20327.68l-148.48%20153.6L56.32%20819.2c-5.12-5.12-15.36-10.24-25.6-10.24s-15.36%205.12-25.6%2010.24c0%205.12-5.12%2015.36-5.12%2025.6s5.12%2015.36%2010.24%2025.6L102.4%20957.44c5.12%205.12%2015.36%2010.24%2025.6%2010.24h5.12c10.24%200%2015.36-5.12%2025.6-10.24l174.08-174.08c5.12-5.12%2010.24-15.36%2010.24-25.6s-5.12-15.36-10.24-25.6c-25.6-5.12-40.96-5.12-56.32%205.12zM1024%20153.6c0%2030.72-25.6%2056.32-56.32%2056.32h-460.8c-30.72%200-61.44-25.6-61.44-56.32%200-30.72%2025.6-56.32%2056.32-56.32h455.68c35.84-5.12%2066.56%2020.48%2066.56%2056.32z%20m0%20358.4c0%2030.72-25.6%2056.32-56.32%2056.32h-460.8c-30.72%200-56.32-25.6-56.32-56.32s25.6-56.32%2056.32-56.32h455.68c35.84%200%2061.44%2025.6%2061.44%2056.32z%20m-5.12%20358.4c0%2030.72-25.6%2056.32-56.32%2056.32h-460.8c-30.72%200-56.32-25.6-56.32-56.32%200-30.72%2025.6-56.32%2056.32-56.32h455.68c35.84%200%2061.44%2025.6%2061.44%2056.32z%20m0%200'%20%3e%3c/path%3e%3c/svg%3e", Fn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
992
|
+
__proto__: null,
|
|
993
|
+
default: Kn
|
|
994
|
+
}, Symbol.toStringTag, { value: "Module" })), zn = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1757902488735'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='3957'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='200'%20height='200'%3e%3cpath%20d='M520.416%20179.392c-12.384%200-22.4%204.672-22.4%2010.432l-0.032%20139.136c0%205.76%2010.016%2010.432%2022.368%2010.432%2012.352%200%2022.368-4.672%2022.368-10.432l0.064-139.136c0-5.76-10.016-10.432-22.4-10.432M520.32%20623.04c-12.352%200-22.368%204.64-22.368%2010.4l-0.032%20139.168c0%205.76%2010.016%2010.432%2022.368%2010.432%2012.352%200%2022.368-4.672%2022.368-10.432l0.064-139.168c0-5.76-10.016-10.4-22.4-10.4M800.256%20458.72l-139.168-0.064c-5.76%200-10.432%2010.016-10.432%2022.4%200%2012.352%204.672%2022.368%2010.432%2022.368l139.168%200.032c5.76%200%2010.4-10.016%2010.4-22.368%200-12.352-4.64-22.368-10.4-22.4zM352.256%20458.72l-139.168-0.064c-5.76%200-10.432%2010.016-10.432%2022.4%200%2012.352%204.672%2022.368%2010.432%2022.368l139.168%200.032c5.76%200%2010.4-10.016%2010.4-22.368%200-12.352-4.64-22.368-10.4-22.4M801.568%20748.672l-72.544-72.544%2073.792-23.2a4.416%204.416%200%200%200%200.096-8.384l-183.136-62.4a4.416%204.416%200%200%200-5.6%205.568l62.464%20183.168a4.416%204.416%200%200%200%208.352-0.064l23.36-73.6%2072.32%2072.32a14.752%2014.752%200%200%200%2020.896-20.864M510.688%20382.112c49.952%200%2092.8%2040.832%2092.8%2092.8%200%2051.968-42.848%2092.8-92.8%2092.8-49.984%200-92.8-40.832-92.8-92.8%200-51.968%2042.816-92.8%2092.8-92.8z'%20p-id='3958'%3e%3c/path%3e%3c/svg%3e", Tn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
986
995
|
__proto__: null,
|
|
987
996
|
default: zn
|
|
988
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
997
|
+
}, Symbol.toStringTag, { value: "Module" })), Vn = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='10587'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20fill='%23555'%20width='16'%20height='16'%3e%3cpath%20d='M64.21%20703.88h888.34M64.21%20667.88h888.34v72H64.21z'%3e%3c/path%3e%3cpath%20d='M509.58%20102.72v566.13M473.58%20102.72h72v566.14h-72z'%3e%3c/path%3e%3c/svg%3e", jn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
989
998
|
__proto__: null,
|
|
990
|
-
default:
|
|
991
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
999
|
+
default: Vn
|
|
1000
|
+
}, Symbol.toStringTag, { value: "Module" })), Gn = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1757902547951'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='5129'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='200'%20height='200'%3e%3cpath%20d='M59.355%2091.776v867.881h867.881V91.776H59.356zM897.31%20929.73H89.282V121.703h808.027V929.73z'%20fill=''%20p-id='5130'%3e%3c/path%3e%3cpath%20d='M833.964%20185.048H152.627v681.337h681.337V185.048z%20m-355.632%20651.41H182.554V532.2h295.778v304.257z%20m0-334.184H182.554V214.975h295.778v287.299z%20m325.705%20334.184H508.259V532.2h295.778v304.257z%20m0-334.184H508.259V214.975h295.778v287.299z'%20fill=''%20p-id='5131'%3e%3c/path%3e%3c/svg%3e", Qn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
992
1001
|
__proto__: null,
|
|
993
|
-
default:
|
|
994
|
-
}, Symbol.toStringTag, { value: "Module" }));
|
|
995
|
-
class
|
|
1002
|
+
default: Gn
|
|
1003
|
+
}, Symbol.toStringTag, { value: "Module" })), Hn = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAKdUlEQVR4AeydbZrUKBRGq2YjOjvpWYntStSVjK5EdzLOSsr7arBLOkkBAcLHmacwlQQInMsZUvdP/3Xhv+oEbrfbk5XYz1P1gfLAC4KwCCCwQwBBduBwCwIIwhqAwA4BBNmBwy0IFBQEuBDonwCC9B9DZlCQAIIUhEvX/RNAkP5jyAwKEkCQgnDpun8CfQrSP3dm0AkBBOkkUAzzHAIIcg53ntoJAQTpJFAM8xwCCHIOd57aCQEE8QLFKQTuCSDIPQ2+Q8AjgCAeEE4hcE8AQe5p8B0CHgEE8YBwCoF7AghyT6Psd3rvkACCdBg0hlyPAILUY82TOiSAIB0GjSHXI4Ag9VjzpA4JIEiHQXs9ZK6UIoAgpcjS7xAEEGSIMDKJUgQQpBRZ+h2CAIIMEUYmUYoAgpQiO0q/k88DQSZfAEx/nwCC7PPh7uQEEGTyBcD09wkgyD4f7k5OAEEmXwBnTr+HZyNID1FijKcRQBAP/e12e2vl2cqHUsUe+c5K7OddqfG4fmMHNEN9BPGifL1ev9ulN1Y+FizP1nfsR21Kjun/2AHNUB9BVqJsknyyy1qMdpji89nm/HmKmUZOEkE2gNmCkSTaTTZqDHP5m831/TCz+TWRbP8iyA5KWzh/2+2RJfluc/zH5shngwCCbIC5u6wFNKIkmhM7x12g174iyBqVu2v2f1gtpBFft97b3L7dTZWvKwQQZAWKf8kWkn7Aqvi3ej1HjsDIIUggKJNEu8gImS0yVoExV7XXgugqZZXAIoleuVbvd3CRjFVkkBAkEphJ0mtmi4xVZKxVHUFEIb70ltnSrkfGKj7OFwRJgGa7iBacfpPomNBD9Sb8KE9EjiCJ4EwSZbVUEnuo1gw5DqCuKsiBcTbZ1CTRLtJyZouM1cGVgyAHAS6StPiqRcbqYGzVHEFE4WAxSVrLbJGxOhhT1xxBHInjx1YyW9rNyFgdj+fPHhDkJ4bj/9guooWp3yQ6Hu8wvQd+lKeze9VyFEFeTeyMCyaJsloqZzxez0QOUchYECQjTHVlkmgXOSOzRcZKAchcECQzUHW3SFLzVYuMlcAXKAhSAKq6NElqZbbIWAl4oYIghcAu3ZbObGmXImO1wC5xQJCHVNMr2C6iBazfJDqmd7Tdkh/l22yy3EGQLBi3OzFJlNVS2a6Udgc50rhFtUKQKFxplU0S7SI5M1tkrNJCEd0KQaKRpTVYJMnxqkXGKi0ESa0QJAlbWiOT5Ghmi4xVGvrkVgiSjC654UtmK64L7T5krOKYHa6NIIcRxnVgu4gWun6T6BjTmB/lMbQy1UWQTCBjujFJlNVSCW2GHKGkMtdDkMxAQ7szSbSLhGS2yFiFQi1QD0EKQA3tcpFk71WLjFUozEL1EKQQ2NBuTZKtzNahjFXo86m3TwBB9vnUuutntrSrkLGqRX/nOQiyA6fWLdtFJIR+k+iox/KjXBQaKAjSQBA0BJNEWS0V5BCQRgqCNBIIDcMk+WRFkuiU0gABBGkgCJ0NYarhIshU4WaysQQQJJYY9acigCBThZvJxhJAkFhi1J+KAIJMFe7WJ9ve+BCkvZgwooYIIEhDwWAo7RFAkPZiwogaIoAgDQWDobRHAEHaiwkjKkEgsU8ESQRHszkIIMgccWaWiQQQJBEczeYggCBzxJlZJhJAkERwNJuDQIggc5BglhBYIZBNkNvt9kSBQStrYGWtJ13KJsjy9K92pFwuMDiXgS3DPJ/cguQZFb1AoBECCNJIIBhGmwROFqRNKIwKAo4AgjgSHCGwQgBBVqBwCQKOAII4EhwhsEIAQVagcAkCjsC4grgZcoTAAQIIcgAeTccngCDjx5gZHiCAIAfg0XR8ArkF0V9KolwuMDiXQTZzswlyvV71ByenKMy1/VjnMiSbILkGRD8QaIkAgrQUDcbSHAEEaS4kDKglAgjSUjQYS3MEEKStkDCaxgggSGMBYThtEUCQtuLBaBojgCCNBYThtEUAQdqKB6NpjACCNBaQcsOh5xQCCJJCjTbTEECQaULNRFMIIEgKNdpMQwBBpgk1E00hgCAp1GjzJ4GBzxBk4OAyteMEEOQ4Q3oYmACCNBTc2+32bOVDQ0OafigI0sgSMDGebCj/Wvlo39/akU8DBBCkgSAsQuiP7rjR/Ldcc+fTHs+eOIKcHIFFBO0c/ki+Lvf865xXJIAgFWFvPEpy6PXKv63XrA9I4mOpe44gdXn/8TRb/FtyuHrP9uWdFT4nEUCQk8CbHFr8Ko9GoB/tZLYeUSp0H0EKgd3r1uTQK5V2j71q9/ckiV657q/x/RiBoNYIEoQpXyWTQwv9PmMV2jmZrVBSGeshSEaYj7pa5IjZOfwuyWz5RAqfI0hhwF73kkOvV97l4FPtPmS2gnEdr4ggxxkG9WC7x1E53HP0w57MlqNR+IgghQGre5NDi1pFpzmKfrST2cpB8kEfaYI86JTbLwRMDr1Safd4uZjnmyTRK1ee3uhllQCCrGLJc9Hk0AJOyViFDoDMViipxHoIkgjuUbNFjhI7h/9oMls+kYznCJIRpteV5NDrlXc5+6l2KTJb2bH+6hBBfnHI+q/tHrXkcONWAoDMlqOR8dicIBnndkpXJocWq0rt5+tHO5mtzNQRJCNQk0OvVNo9MvYa1ZUk0StXVCMqbxNAkG02UXdMDi3Mkhmr0PGQ2QolFVAPQQIgPaqyyHHmzuEPkcyWTyTxHEESwXnNJIder7zLp51qNyOzlQH/TIJkwPW6C9s9WpPDDVKJAjJbjkbiEUESwamZyaFFqKLTFot+tJPZOhAZBEmEZ3LolUq7R2IP1ZpJEr1yVXvgSA9CkIRomhxacC1krEJHT2YrlJRXD0E8II9OFzl62Dn8qZDZ8okEnCNIACSviuTQ69Xd5S6+atcjsxUZKgSJAGa7R69yuFkqoUBmy9EIOCJIACRVMTm0uFR02nPRj3YyW4ERRJAAUCaHXqm0ewTU7qKKJNErVxeDPXOQCPKAvsmhhdRTxurBjH7fJrP1G8X2FwTZZnNZ5Dh359gZX4ZbZLYeQESQfUCSQ69X+7X6vavdkczWTvwQZAOO7R6jy+FmrsQDmS1HwzsiiAdEpyaHFo2KTmco+tFOZmsl0giyAsUuvbHysWD5bH3HftSm5JhixzNFfQRZCfP1ev10LVjskV+sxH6+5B6T31/sgGaojyAzRJk5JhNAkGR0NJyBAILMEGXmmEwAQZLR0XAGAggyQ5Trz3GYJyLIMKFkIiUIIEgJqvQ5DAEEGSaUTKQEAQQpQZU+hyGAIMOEcpaJ1J0ngtTlzdM6I4AgnQWM4dYlgCB1efO0zgggSGcBY7h1CSBIXd48rWUCK2NDkBUoXIKAI4AgjgRHCKwQQJAVKFyCgCOAII4ERwisEECQFShcgoAjkEsQ1x9HCAxFAEGGCieTyU0AQXITpb+hCCDIUOFkMrkJIEhuovQ3FIEOBBmKN5PpjACCdBYwhluXAILU5c3TOiOAIJ0FjOHWJYAgdXnztM4IzC1IZ8FiuPUJIEh95jyxIwII0lGwGGp9AghSnzlP7IgAgnQULIZanwCCFGJOt2MQ+AEAAP//U3PGlQAAAAZJREFUAwA3ILMm/jaVEAAAAABJRU5ErkJggg==", Jn = new m.TextureLoader(), Wn = Jn.load(Hn);
|
|
1004
|
+
class qn extends Ee {
|
|
996
1005
|
static name = "RenderManager";
|
|
997
1006
|
container = new m.Group();
|
|
998
1007
|
lines = [];
|
|
999
|
-
pointVirtualGrid = new
|
|
1000
|
-
quadtree = new ze(new
|
|
1008
|
+
pointVirtualGrid = new Fe();
|
|
1009
|
+
quadtree = new ze(new Ye());
|
|
1001
1010
|
actionHistory = /* @__PURE__ */ new Set();
|
|
1011
|
+
verticalReferenceLineFlag = new m.Mesh(new m.PlaneGeometry(0.3, 0.3), new m.MeshBasicMaterial({ map: Wn, color: 58111, transparent: !0 }));
|
|
1002
1012
|
onAddFromParent() {
|
|
1003
1013
|
const e = this.dxfLineModel;
|
|
1004
1014
|
this.editor.container.add(this.container), this.editor.container.add(e.dxfModelGroup), e.dxfLineModel.material = new m.LineBasicMaterial({
|
|
@@ -1018,7 +1028,7 @@ class An extends ye {
|
|
|
1018
1028
|
return;
|
|
1019
1029
|
} else
|
|
1020
1030
|
this.updatedMode = "dxf";
|
|
1021
|
-
this.pointVirtualGrid = new
|
|
1031
|
+
this.pointVirtualGrid = new Fe();
|
|
1022
1032
|
const e = this.dxf.box.clone().expansion(Math.max(this.dxf.box.width, this.dxf.box.height) * 2);
|
|
1023
1033
|
(e.width === 0 || e.height === 0) && e.set(-200, -200, 200, 200), this.quadtree = new ze(e), this.lines.length = 0, this.dxf.lineSegments.forEach((t) => {
|
|
1024
1034
|
t.userData.isDoor && !t.userData.doorDirectConnection || this.addLine(t.clone());
|
|
@@ -1080,13 +1090,16 @@ class An extends ye {
|
|
|
1080
1090
|
draw(e = !0) {
|
|
1081
1091
|
this.container.clear();
|
|
1082
1092
|
const t = [], n = [], o = [];
|
|
1083
|
-
this.lines.forEach((
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
}),
|
|
1087
|
-
const
|
|
1093
|
+
this.lines.forEach((a) => {
|
|
1094
|
+
if (a.points.forEach((s) => {
|
|
1095
|
+
a.userData.isDoor ? n.push(s.x, s.y, 0) : t.push(s.x, s.y, 0);
|
|
1096
|
+
}), a.userData.isWindow && a.userData.drawWindow && a.userData.drawWindow.forEach(({ width: s, p: r }) => {
|
|
1097
|
+
const l = W.from(r), d = a.direction(), c = l.clone().add(d.clone().multiplyScalar(s * 0.5)), h = l.clone().add(d.clone().multiplyScalar(-s * 0.5));
|
|
1088
1098
|
o.push(c.x, c.y, 1e-3), o.push(h.x, h.y, 1e-3);
|
|
1089
|
-
})
|
|
1099
|
+
}), a.userData.isVerticalReferenceLine) {
|
|
1100
|
+
const s = a.center;
|
|
1101
|
+
this.verticalReferenceLineFlag.position.set(s.x, s.y, 0), this.container.add(this.verticalReferenceLineFlag);
|
|
1102
|
+
}
|
|
1090
1103
|
}), t.length && this.renderer.createLineSegments({
|
|
1091
1104
|
position: t
|
|
1092
1105
|
}, t.length / 3, {
|
|
@@ -1106,21 +1119,21 @@ class An extends ye {
|
|
|
1106
1119
|
* @returns
|
|
1107
1120
|
*/
|
|
1108
1121
|
adsorption(e = 0.1, t = this.pointVirtualGrid, n = this.quadtree) {
|
|
1109
|
-
const o = this.parent?.findComponentByName("Editor"),
|
|
1110
|
-
if (
|
|
1111
|
-
point: new m.Vector3(
|
|
1122
|
+
const o = this.parent?.findComponentByName("Editor"), a = W.from(o.pointerPosition), s = t.queryCircle(a, e).sort((l, d) => l.point.distance(a) - d.point.distance(a));
|
|
1123
|
+
if (s.length) return {
|
|
1124
|
+
point: new m.Vector3(s[0].point.x, s[0].point.y, 0),
|
|
1112
1125
|
find: !0,
|
|
1113
1126
|
mode: "point",
|
|
1114
|
-
line:
|
|
1127
|
+
line: s[0].userData
|
|
1115
1128
|
};
|
|
1116
|
-
let
|
|
1117
|
-
if (
|
|
1118
|
-
let
|
|
1119
|
-
return
|
|
1120
|
-
point: new m.Vector3(
|
|
1129
|
+
let r = n.queryCircle(a, e);
|
|
1130
|
+
if (r.length) {
|
|
1131
|
+
let l = r.map((d) => d.line.projectPoint(a));
|
|
1132
|
+
return l.sort((d, c) => d && c ? d.distance(a) - c.distance(a) : 0), r = r.filter((d, c) => !!l[c]), l = l.filter((d, c) => !!l[c]), {
|
|
1133
|
+
point: new m.Vector3(l[0].x, l[0].y, 0),
|
|
1121
1134
|
find: !0,
|
|
1122
1135
|
mode: "line",
|
|
1123
|
-
line:
|
|
1136
|
+
line: r[0].line
|
|
1124
1137
|
};
|
|
1125
1138
|
}
|
|
1126
1139
|
return {
|
|
@@ -1142,7 +1155,7 @@ class An extends ye {
|
|
|
1142
1155
|
*/
|
|
1143
1156
|
toJson() {
|
|
1144
1157
|
return this.lines.map((e) => {
|
|
1145
|
-
const t = e.userData, n = t.
|
|
1158
|
+
const t = e.userData, n = t.drawWindow, o = this.quadtree.queryLineSegment(e).filter((a) => a.line !== e && !a.userData?.isDoor).map((a) => ({ index: this.lines.indexOf(a.line) }));
|
|
1146
1159
|
return {
|
|
1147
1160
|
start: e.start.toJson(this.dxf.originalZAverage),
|
|
1148
1161
|
end: e.end.toJson(this.dxf.originalZAverage),
|
|
@@ -1151,10 +1164,11 @@ class An extends ye {
|
|
|
1151
1164
|
doorDirectConnection: t.isDoor,
|
|
1152
1165
|
length: e.length(),
|
|
1153
1166
|
isWindow: t.isWindow,
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1167
|
+
isVerticalReferenceLine: t.isVerticalReferenceLine,
|
|
1168
|
+
drawWindow: n && n.map((a) => ({
|
|
1169
|
+
p: { x: a.p.x, y: a.p.y, z: a.p.z },
|
|
1170
|
+
width: a.width,
|
|
1171
|
+
full: a.full
|
|
1158
1172
|
}))
|
|
1159
1173
|
};
|
|
1160
1174
|
});
|
|
@@ -1195,7 +1209,7 @@ class An extends ye {
|
|
|
1195
1209
|
return this.parent?.findComponentByName("DxfLineModel");
|
|
1196
1210
|
}
|
|
1197
1211
|
}
|
|
1198
|
-
class
|
|
1212
|
+
class Un extends V {
|
|
1199
1213
|
static name = "DrawDoorLine";
|
|
1200
1214
|
container = new m.Group();
|
|
1201
1215
|
interruptKeys = ["escape"];
|
|
@@ -1205,8 +1219,8 @@ class jn extends T {
|
|
|
1205
1219
|
super.onAddFromParent(e);
|
|
1206
1220
|
const t = e.findComponentByName("Editor"), n = t.eventInput, o = t.commandManager;
|
|
1207
1221
|
this.editor.container.add(this.container);
|
|
1208
|
-
const
|
|
1209
|
-
n.addKeyCombination(this.commandName, this.shortcutKeys),
|
|
1222
|
+
const a = this.commandManager.addCommandFlow("draw-door-line").add(this.createInterrupt()).add(this.createCursor("no-drop")).add(this.selectPoint.bind(this)).add(this.end.bind(this)).addRollback(this.rollback.bind(this)).addRevokeRollback(this.revokeRollback.bind(this));
|
|
1223
|
+
n.addKeyCombination(this.commandName, this.shortcutKeys), a.addEventListener("finally", this.createFinally()), a.addEventListener("completed", (s) => this.completed(s.data)), n.addCancelDefaultBehavior(() => n.isOnlyKeyDowns(this.shortcutKeys)), n.addEventListener("codeChange", async () => {
|
|
1210
1224
|
n.isKeyCombination(this.commandName) && await o.start(this.commandName);
|
|
1211
1225
|
});
|
|
1212
1226
|
}
|
|
@@ -1214,36 +1228,36 @@ class jn extends T {
|
|
|
1214
1228
|
* @param next
|
|
1215
1229
|
*/
|
|
1216
1230
|
selectPoint(e) {
|
|
1217
|
-
let t = this.parent?.findComponentByName("Editor"), n = null, o = new m.Mesh(new m.SphereGeometry(0.05), new m.MeshBasicMaterial({ color: 65280 })),
|
|
1231
|
+
let t = this.parent?.findComponentByName("Editor"), n = null, o = new m.Mesh(new m.SphereGeometry(0.05), new m.MeshBasicMaterial({ color: 65280 })), a = new we([], 16711935), s = new we([
|
|
1218
1232
|
new m.Vector3(-1e4, 0, 0),
|
|
1219
1233
|
new m.Vector3(1e4, 0, 0),
|
|
1220
1234
|
new m.Vector3(0, -1e4, 0),
|
|
1221
1235
|
new m.Vector3(0, 1e4, 0)
|
|
1222
1236
|
], 16711935);
|
|
1223
|
-
|
|
1237
|
+
s.material = new m.LineDashedMaterial({
|
|
1224
1238
|
color: 4235007,
|
|
1225
1239
|
dashSize: 0.1,
|
|
1226
1240
|
gapSize: 0.1,
|
|
1227
1241
|
linewidth: 0.1
|
|
1228
|
-
}), this.container.add(
|
|
1229
|
-
let
|
|
1242
|
+
}), this.container.add(a);
|
|
1243
|
+
let r = null;
|
|
1230
1244
|
this.addEventRecord(
|
|
1231
1245
|
"clear",
|
|
1232
1246
|
t.addEventListener("pointerPositionChange", () => {
|
|
1233
|
-
const { point:
|
|
1234
|
-
n &&
|
|
1247
|
+
const { point: l, find: d } = t.renderManager.adsorption(0.05);
|
|
1248
|
+
n && a.setPoint(n, l), this.dispatchEvent({ type: "pointerMove", point: l }), d ? (o.position.set(l.x, l.y, 0), this.container.add(o), this.domElement.style.cursor = "none", r = l.clone()) : (r = null, o.removeFromParent(), this.domElement.style.cursor = "no-drop");
|
|
1235
1249
|
}),
|
|
1236
1250
|
t.eventInput.addEventListener("codeChange", async () => {
|
|
1237
|
-
if (t.eventInput.isKeyDown("mouse_0") &&
|
|
1251
|
+
if (t.eventInput.isKeyDown("mouse_0") && r) {
|
|
1238
1252
|
if (!n) {
|
|
1239
|
-
n =
|
|
1253
|
+
n = r.clone();
|
|
1240
1254
|
return;
|
|
1241
1255
|
}
|
|
1242
|
-
e([n.clone(),
|
|
1256
|
+
e([n.clone(), r.clone()]);
|
|
1243
1257
|
}
|
|
1244
1258
|
}),
|
|
1245
1259
|
function() {
|
|
1246
|
-
|
|
1260
|
+
a.removeFromParent(), o.removeFromParent(), s.removeFromParent();
|
|
1247
1261
|
}
|
|
1248
1262
|
);
|
|
1249
1263
|
}
|
|
@@ -1255,8 +1269,8 @@ class jn extends T {
|
|
|
1255
1269
|
end(e, t) {
|
|
1256
1270
|
const n = [];
|
|
1257
1271
|
for (let o = 0; o < t.length; o += 2) {
|
|
1258
|
-
const
|
|
1259
|
-
|
|
1272
|
+
const a = new ce(W.from(t[o]), W.from(t[o + 1]));
|
|
1273
|
+
a.userData.isDoor = !0, a.userData.doorDirectConnection = !0, n.push(a);
|
|
1260
1274
|
}
|
|
1261
1275
|
e(n);
|
|
1262
1276
|
}
|
|
@@ -1279,7 +1293,7 @@ class jn extends T {
|
|
|
1279
1293
|
return this.completed(e), e;
|
|
1280
1294
|
}
|
|
1281
1295
|
}
|
|
1282
|
-
class
|
|
1296
|
+
class Zn extends V {
|
|
1283
1297
|
static name = "DrawWindow";
|
|
1284
1298
|
container = new m.Group();
|
|
1285
1299
|
interruptKeys = ["escape"];
|
|
@@ -1296,8 +1310,8 @@ class Gn extends T {
|
|
|
1296
1310
|
selectPointStart(e) {
|
|
1297
1311
|
let t = null, n = new m.Mesh(new m.SphereGeometry(0.05), new m.MeshBasicMaterial({ color: 16711935 })), o = null;
|
|
1298
1312
|
this.addEventRecord("selectPointStart").add(this.editor.addEventListener("pointerPositionChange", () => {
|
|
1299
|
-
const { point:
|
|
1300
|
-
this.dispatchEvent({ type: "pointerMove", point:
|
|
1313
|
+
const { point: a, line: s, find: r } = this.editor.renderManager.adsorption();
|
|
1314
|
+
this.dispatchEvent({ type: "pointerMove", point: a }), r ? (this.domElement.style.cursor = "none", n.position.copy(a), o = s, t = a.clone(), this.container.add(n)) : (this.domElement.style.cursor = "no-drop", t = null, n.removeFromParent());
|
|
1301
1315
|
})).add(this.eventInput.addEventListener("codeChange", () => {
|
|
1302
1316
|
this.eventInput.isKeyDown("mouse_0") && t && (this.canceEventRecord("selectPointStart"), e({ point: t, line: o }));
|
|
1303
1317
|
})), this.addEventRecord("clear").add(() => n.removeFromParent());
|
|
@@ -1306,10 +1320,10 @@ class Gn extends T {
|
|
|
1306
1320
|
* @param next
|
|
1307
1321
|
*/
|
|
1308
1322
|
selectPointEnd(e, { point: t, line: n }) {
|
|
1309
|
-
let o = null,
|
|
1310
|
-
this.addEventRecord("clear").add(() =>
|
|
1311
|
-
const { point:
|
|
1312
|
-
this.dispatchEvent({ type: "pointerMove", point:
|
|
1323
|
+
let o = null, a = new m.Mesh(new m.SphereGeometry(0.05), new m.MeshBasicMaterial({ color: 16711935 }));
|
|
1324
|
+
this.addEventRecord("clear").add(() => a.removeFromParent()).add(this.editor.addEventListener("pointerPositionChange", () => {
|
|
1325
|
+
const { point: s, find: r, line: l } = this.editor.renderManager.adsorption();
|
|
1326
|
+
this.dispatchEvent({ type: "pointerMove", point: s }), r && l === n ? (this.domElement.style.cursor = "none", a.position.copy(s), o = s.clone(), this.container.add(a)) : (this.domElement.style.cursor = "no-drop", o = null, a.removeFromParent());
|
|
1313
1327
|
})).add(this.eventInput.addEventListener("codeChange", () => {
|
|
1314
1328
|
this.eventInput.isKeyDown("mouse_0") && o && e({ line: n, start: t, end: o });
|
|
1315
1329
|
}));
|
|
@@ -1320,26 +1334,26 @@ class Gn extends T {
|
|
|
1320
1334
|
* @param points
|
|
1321
1335
|
*/
|
|
1322
1336
|
end(e, { start: t, end: n, line: o }) {
|
|
1323
|
-
const
|
|
1324
|
-
p: new m.Vector3(
|
|
1325
|
-
width:
|
|
1326
|
-
full: Math.abs(
|
|
1337
|
+
const a = new ce(W.from(t), W.from(n)), s = a.center, r = a.length(), l = {
|
|
1338
|
+
p: new m.Vector3(s.x, s.y, 0),
|
|
1339
|
+
width: r,
|
|
1340
|
+
full: Math.abs(r - o.length()) < 0.01
|
|
1327
1341
|
};
|
|
1328
|
-
e({ line: o, doorDataItem:
|
|
1342
|
+
e({ line: o, doorDataItem: l });
|
|
1329
1343
|
}
|
|
1330
1344
|
/** 执行完成
|
|
1331
1345
|
*/
|
|
1332
1346
|
completed({ doorDataItem: e, line: t }) {
|
|
1333
|
-
t.userData.isWindow = !0, t.userData.
|
|
1347
|
+
t.userData.isWindow = !0, t.userData.drawWindow || (t.userData.drawWindow = []), t.userData.drawWindow.push(e), this.renderManager.draw();
|
|
1334
1348
|
}
|
|
1335
1349
|
/** 回滚操作
|
|
1336
1350
|
* @param data
|
|
1337
1351
|
*/
|
|
1338
1352
|
rollback(e) {
|
|
1339
1353
|
const { doorDataItem: t, line: n } = e;
|
|
1340
|
-
if (n.userData.
|
|
1341
|
-
const o = n.userData.
|
|
1342
|
-
o !== -1 && (n.userData.
|
|
1354
|
+
if (n.userData.drawWindow) {
|
|
1355
|
+
const o = n.userData.drawWindow.indexOf(t);
|
|
1356
|
+
o !== -1 && (n.userData.drawWindow.splice(o, 1), n.userData.drawWindow.length === 0 && (delete n.userData.drawWindow, delete n.userData.isWindow), this.renderManager.draw());
|
|
1343
1357
|
}
|
|
1344
1358
|
return e;
|
|
1345
1359
|
}
|
|
@@ -1351,7 +1365,7 @@ class Gn extends T {
|
|
|
1351
1365
|
return this.completed(e), e;
|
|
1352
1366
|
}
|
|
1353
1367
|
}
|
|
1354
|
-
class
|
|
1368
|
+
class de extends V {
|
|
1355
1369
|
static name = "VerticalCorrection";
|
|
1356
1370
|
container = new m.Group();
|
|
1357
1371
|
shortcutKeys = ["control", "c"];
|
|
@@ -1360,18 +1374,18 @@ class ee extends T {
|
|
|
1360
1374
|
recursion = !1;
|
|
1361
1375
|
onAddFromParent(e) {
|
|
1362
1376
|
super.onAddFromParent(e), this.editor.container.add(this.container), this.container.position.z = 1e-3;
|
|
1363
|
-
const t = this.commandManager.addCommandFlow(
|
|
1377
|
+
const t = this.commandManager.addCommandFlow(de.commandName).add(this.createInterrupt()).add(this.constraint.bind(this)).add(this.verticalCorrection.bind(this)).addRollback(this.rollback.bind(this)).addRevokeRollback(this.revokeRollback.bind(this));
|
|
1364
1378
|
t.addEventListener("finally", this.createFinally()), t.addEventListener("completed", (n) => this.completed(n.data)), t.addEventListener("started", () => {
|
|
1365
1379
|
!this.eventInput.isOnlyKeyDowns(this.shortcutKeys) && !this.eventInput.isOnlyKeyDowns(this.shortcutKeys2) && (this.recursion = !1);
|
|
1366
1380
|
}), this.eventInput.addEventListener("codeChange", async () => {
|
|
1367
|
-
this.eventInput.isOnlyKeyDowns(this.shortcutKeys) ? (this.recursion = !1, this.commandManager.start(
|
|
1381
|
+
this.eventInput.isOnlyKeyDowns(this.shortcutKeys) ? (this.recursion = !1, this.commandManager.start(de.commandName, [...this.default.selectLines])) : this.eventInput.isOnlyKeyDowns(this.shortcutKeys2) && (this.recursion = !0, this.commandManager.start(de.commandName, [...this.default.selectLines]));
|
|
1368
1382
|
}), this.eventInput.addCancelDefaultBehavior(() => this.eventInput.isOnlyKeyDowns(this.shortcutKeys) || this.eventInput.isOnlyKeyDowns(this.shortcutKeys2));
|
|
1369
1383
|
}
|
|
1370
1384
|
/**
|
|
1371
1385
|
* 进入命令约束
|
|
1372
1386
|
*/
|
|
1373
1387
|
constraint(e, t) {
|
|
1374
|
-
Array.isArray(t) ? t.length !== 1 ? (
|
|
1388
|
+
Array.isArray(t) ? t.length !== 1 ? (D({ message: "请选择一条线段", type: "warning" }), this.cancel()) : e(t) : (D({ message: "进入命令失败", type: "warning" }), this.cancel());
|
|
1375
1389
|
}
|
|
1376
1390
|
/**
|
|
1377
1391
|
* 线段是否为结尾线段
|
|
@@ -1380,7 +1394,7 @@ class ee extends T {
|
|
|
1380
1394
|
lineIsPathEnd(e) {
|
|
1381
1395
|
for (let t = 0; t < e.points.length; t++) {
|
|
1382
1396
|
const n = e.points[t];
|
|
1383
|
-
if (this.renderManager.pointVirtualGrid.queryPoint(n).filter((
|
|
1397
|
+
if (this.renderManager.pointVirtualGrid.queryPoint(n).filter((a) => !a.point.equal(n)).length === 0) return !0;
|
|
1384
1398
|
}
|
|
1385
1399
|
return !1;
|
|
1386
1400
|
}
|
|
@@ -1398,65 +1412,98 @@ class ee extends T {
|
|
|
1398
1412
|
* @param point2
|
|
1399
1413
|
*/
|
|
1400
1414
|
getSamePointAll(e, t) {
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
line: o.userData
|
|
1407
|
-
};
|
|
1408
|
-
return o.point.copy(s.newPoint), s;
|
|
1409
|
-
});
|
|
1415
|
+
const n = this.renderManager.pointVirtualGrid.queryPoint(e), o = n.filter((a) => t !== a.userData && a.userData?.directionEqual(t));
|
|
1416
|
+
return {
|
|
1417
|
+
queryList: n,
|
|
1418
|
+
parallelList: o
|
|
1419
|
+
};
|
|
1410
1420
|
}
|
|
1411
|
-
/**
|
|
1412
|
-
*
|
|
1413
|
-
* @param
|
|
1421
|
+
/**
|
|
1422
|
+
*
|
|
1423
|
+
* @param line
|
|
1424
|
+
* @param point
|
|
1425
|
+
* @param newPoint
|
|
1414
1426
|
*/
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
const i = a.direction(), d = s.angleBetween(i, "angle"), l = Math.abs(90 - d);
|
|
1423
|
-
if (!(l > 20 || l < 1))
|
|
1424
|
-
if (this.isTowLineSegmentConnect(e, a)) {
|
|
1425
|
-
const c = e.start.equal(a.start) || e.start.equal(a.end) ? e.start : e.end, h = a.start.equal(e.start) || a.start.equal(e.end) ? a.end : a.start, f = new ne(
|
|
1426
|
-
h.clone().add(s.clone().multiplyScalar(1)),
|
|
1427
|
-
h.clone().add(s.clone().multiplyScalar(-1))
|
|
1428
|
-
), g = f.projectPoint(c, !1);
|
|
1429
|
-
g && t.push(this.getSamePointAll(h, g));
|
|
1430
|
-
} else
|
|
1431
|
-
console.log("交点");
|
|
1432
|
-
}), this.recursion && o.forEach((a) => this.correction0(a, t, n)), t;
|
|
1427
|
+
setLine(e, t, n, o = []) {
|
|
1428
|
+
e.direction();
|
|
1429
|
+
const a = e.start.equal(t) ? e.start : e.end, s = e.start.equal(t) ? e.end : e.start;
|
|
1430
|
+
e.clone().set(a, s);
|
|
1431
|
+
const { queryList: r, parallelList: l } = this.getSamePointAll(a, e);
|
|
1432
|
+
r.forEach((d) => {
|
|
1433
|
+
});
|
|
1433
1434
|
}
|
|
1434
1435
|
/** 修正2
|
|
1435
1436
|
* 第一步:确定需要修复的线段
|
|
1436
1437
|
* 第二步:查找与该线段相交的其他线段
|
|
1437
1438
|
* 第三步:找出两端点相交的线段,其他为区间相交
|
|
1438
|
-
*
|
|
1439
|
-
*
|
|
1440
|
-
*
|
|
1439
|
+
* 第四步:修正相交的线段的另一个端点
|
|
1440
|
+
* 第五步:判断是否有方向一致的线段,有就调整,调整方法:查找连续平行的线段,求点在线段方向的投影,直到不平行的线段结束
|
|
1441
|
+
* 第六步: 中间线段采用投影修正
|
|
1441
1442
|
* @param targettLine
|
|
1442
1443
|
* @param vistedList
|
|
1443
1444
|
*/
|
|
1444
|
-
correction(e, t = [],
|
|
1445
|
-
if (
|
|
1446
|
-
|
|
1447
|
-
const
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1445
|
+
correction(e, t, n = [], o = /* @__PURE__ */ new Set()) {
|
|
1446
|
+
if (o.has(e)) return;
|
|
1447
|
+
o.add(e);
|
|
1448
|
+
const a = this.renderManager.quadtree.queryLineSegment(e).filter(({ line: d }) => !(d === e || d.userData.isDoor || o.has(d))).map((d) => d.line), s = e.direction(), [r, l] = a.reduce((d, c) => {
|
|
1449
|
+
const [h, y] = d;
|
|
1450
|
+
return t && (c.start.equal(t) || c.end.equal(t)) || (e.sameEndpoint(c) ? h.push(c) : y.push(c)), d;
|
|
1451
|
+
}, [[], []]);
|
|
1452
|
+
return r.filter((d) => {
|
|
1453
|
+
const c = d.direction(), h = s.angleBetween(c, "angle");
|
|
1454
|
+
if (Math.abs(90 - h) > 20) return !1;
|
|
1455
|
+
const w = e.sameEndpointAsStart(d) ? e.start : e.end, b = d.sameEndpointAsStart(e) ? d.end : d.start;
|
|
1456
|
+
if (o.has(b))
|
|
1457
|
+
return !1;
|
|
1458
|
+
const f = new ce(
|
|
1459
|
+
b.clone().add(s.clone().multiplyScalar(1)),
|
|
1460
|
+
b.clone().add(s.clone().multiplyScalar(-1))
|
|
1461
|
+
), M = f.projectPoint(w, !1);
|
|
1462
|
+
if (M) {
|
|
1463
|
+
const { queryList: L, parallelList: A } = this.getSamePointAll(b, d), G = L.map((E) => {
|
|
1464
|
+
const K = {
|
|
1465
|
+
point: E.point,
|
|
1466
|
+
oldPoint: E.point.clone(),
|
|
1467
|
+
newPoint: M,
|
|
1468
|
+
line: E.userData
|
|
1469
|
+
};
|
|
1470
|
+
return o.add(E.point), K;
|
|
1471
|
+
});
|
|
1472
|
+
if (A.length) {
|
|
1473
|
+
let E = A[0].userData, K = d, k = d.clone();
|
|
1474
|
+
k.start.equal(b) ? k.start.copy(M) : k.end.copy(M);
|
|
1475
|
+
const x = /* @__PURE__ */ new Set();
|
|
1476
|
+
for (; E && !x.has(E); ) {
|
|
1477
|
+
x.add(E);
|
|
1478
|
+
const _ = E.sameEndpointAsStart(K) ? E.end : E.start, p = k.projectPoint(_, !1);
|
|
1479
|
+
if (p) {
|
|
1480
|
+
const { queryList: q, parallelList: R } = this.getSamePointAll(_, E);
|
|
1481
|
+
if (K = E.clone(), q.forEach((Y) => {
|
|
1482
|
+
const he = {
|
|
1483
|
+
point: Y.point,
|
|
1484
|
+
oldPoint: Y.point.clone(),
|
|
1485
|
+
newPoint: p,
|
|
1486
|
+
line: Y.userData
|
|
1487
|
+
};
|
|
1488
|
+
G.push(he);
|
|
1489
|
+
}), R.length) {
|
|
1490
|
+
E = R[0].userData;
|
|
1491
|
+
continue;
|
|
1492
|
+
}
|
|
1493
|
+
}
|
|
1494
|
+
E = null;
|
|
1495
|
+
}
|
|
1496
|
+
}
|
|
1497
|
+
G.map((E) => E.point.copy(E.newPoint)), n.push(G);
|
|
1498
|
+
}
|
|
1499
|
+
return !1;
|
|
1500
|
+
}), this.recursion && a.forEach((d) => this.correction(d, void 0, n, o)), n;
|
|
1454
1501
|
}
|
|
1455
1502
|
/** 开始
|
|
1456
1503
|
* @param next
|
|
1457
1504
|
*/
|
|
1458
1505
|
verticalCorrection(e, t) {
|
|
1459
|
-
e(this.
|
|
1506
|
+
e(this.correction(t[0]));
|
|
1460
1507
|
}
|
|
1461
1508
|
/** 执行完成
|
|
1462
1509
|
* @param data
|
|
@@ -1464,8 +1511,8 @@ class ee extends T {
|
|
|
1464
1511
|
completed(e) {
|
|
1465
1512
|
e.forEach((t) => {
|
|
1466
1513
|
t.forEach((n) => {
|
|
1467
|
-
const { line: o, newPoint:
|
|
1468
|
-
|
|
1514
|
+
const { line: o, newPoint: a, point: s } = n;
|
|
1515
|
+
s.copy(a), this.renderManager.removeLine(o), this.renderManager.addLine(o);
|
|
1469
1516
|
});
|
|
1470
1517
|
}), this.renderManager.draw();
|
|
1471
1518
|
}
|
|
@@ -1473,12 +1520,14 @@ class ee extends T {
|
|
|
1473
1520
|
* @param data
|
|
1474
1521
|
*/
|
|
1475
1522
|
rollback(e) {
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
a
|
|
1480
|
-
|
|
1481
|
-
|
|
1523
|
+
for (let t = e.length - 1; t >= 0; t--) {
|
|
1524
|
+
const n = e[t];
|
|
1525
|
+
for (let o = n.length - 1; o >= 0; o--) {
|
|
1526
|
+
const a = n[o], { line: s, oldPoint: r, point: l } = a;
|
|
1527
|
+
l.copy(r), this.renderManager.removeLine(s), this.renderManager.addLine(s);
|
|
1528
|
+
}
|
|
1529
|
+
}
|
|
1530
|
+
return this.renderManager.draw(), e;
|
|
1482
1531
|
}
|
|
1483
1532
|
/** 撤回回滚
|
|
1484
1533
|
* @param lines
|
|
@@ -1488,22 +1537,22 @@ class ee extends T {
|
|
|
1488
1537
|
return this.completed(e), e;
|
|
1489
1538
|
}
|
|
1490
1539
|
}
|
|
1491
|
-
class
|
|
1540
|
+
class X extends V {
|
|
1492
1541
|
static name = "MergeLine";
|
|
1493
1542
|
shortcutKeys = ["control", "g"];
|
|
1494
1543
|
static commandName = "merge-line";
|
|
1495
1544
|
onAddFromParent(e) {
|
|
1496
1545
|
super.onAddFromParent(e);
|
|
1497
|
-
const t = e.findComponentByType(
|
|
1498
|
-
n.addEventListener("finally", this.createFinally()), n.addEventListener("completed", (o) => this.completed(o.data)), this.eventInput.addKeyCombination(
|
|
1499
|
-
t?.selectLines.length === 2 && this.eventInput.isKeyCombination(
|
|
1546
|
+
const t = e.findComponentByType(Be), n = this.commandManager.addCommandFlow(X.commandName).add(this.createInterrupt()).add(this.constraint.bind(this)).add(this.mergeLine.bind(this)).addRollback(this.rollback.bind(this)).addRevokeRollback(this.revokeRollback.bind(this));
|
|
1547
|
+
n.addEventListener("finally", this.createFinally()), n.addEventListener("completed", (o) => this.completed(o.data)), this.eventInput.addKeyCombination(X.commandName, this.shortcutKeys), this.eventInput.addEventListener("codeChange", async () => {
|
|
1548
|
+
t?.selectLines.length === 2 && this.eventInput.isKeyCombination(X.commandName) && await this.commandManager.start(X.commandName, [...this.default.selectLines]);
|
|
1500
1549
|
}), this.eventInput.addCancelDefaultBehavior(() => this.eventInput.isOnlyKeyDowns(this.shortcutKeys));
|
|
1501
1550
|
}
|
|
1502
1551
|
/**
|
|
1503
1552
|
* 进入命令约束
|
|
1504
1553
|
*/
|
|
1505
1554
|
constraint(e, t) {
|
|
1506
|
-
Array.isArray(t) ? t.length !== 2 ? (
|
|
1555
|
+
Array.isArray(t) ? t.length !== 2 ? (D({ message: "未执行线段合并,请选择两条线段", type: "warning" }), this.cancel()) : e(t) : (D({ message: "进入命令失败", type: "warning" }), this.cancel());
|
|
1507
1556
|
}
|
|
1508
1557
|
/** 开始
|
|
1509
1558
|
* @param next
|
|
@@ -1511,17 +1560,17 @@ class H extends T {
|
|
|
1511
1560
|
*/
|
|
1512
1561
|
mergeLine(e, t) {
|
|
1513
1562
|
const n = t[0], o = t[1];
|
|
1514
|
-
for (let
|
|
1515
|
-
const
|
|
1516
|
-
for (let
|
|
1517
|
-
const
|
|
1518
|
-
if (
|
|
1519
|
-
const
|
|
1520
|
-
return e({ line1: n, line2: o, newLine: h }),
|
|
1563
|
+
for (let a = 0; a < n.points.length; a++) {
|
|
1564
|
+
const s = n.points[a];
|
|
1565
|
+
for (let r = 0; r < o.points.length; r++) {
|
|
1566
|
+
const l = o.points[r];
|
|
1567
|
+
if (s.equal(l)) {
|
|
1568
|
+
const d = n.points[(a + 1) % 2], c = o.points[(r + 1) % 2], h = new ce(d, c);
|
|
1569
|
+
return e({ line1: n, line2: o, newLine: h }), D({ message: "已合并", type: "success" });
|
|
1521
1570
|
}
|
|
1522
1571
|
}
|
|
1523
1572
|
}
|
|
1524
|
-
|
|
1573
|
+
D({ message: "合并失败,两条线未找到共用点", type: "warning" }), this.commandManager.cancel();
|
|
1525
1574
|
}
|
|
1526
1575
|
/** 执行完成
|
|
1527
1576
|
* @param data
|
|
@@ -1543,26 +1592,26 @@ class H extends T {
|
|
|
1543
1592
|
return this.completed(e), e;
|
|
1544
1593
|
}
|
|
1545
1594
|
}
|
|
1546
|
-
class
|
|
1595
|
+
class $ extends V {
|
|
1547
1596
|
static name = "DeleteSelectLine";
|
|
1548
1597
|
shortcutKeys = ["Delete"];
|
|
1549
1598
|
static commandName = "deleteSelectLine";
|
|
1550
1599
|
onAddFromParent(e) {
|
|
1551
|
-
super.onAddFromParent(e), this.commandManager.addCommandFlow(
|
|
1552
|
-
this.eventInput.isKeyCombination(
|
|
1600
|
+
super.onAddFromParent(e), this.commandManager.addCommandFlow($.commandName).add(this.createInterrupt()).add(this.constraint.bind(this)).add(this.delete.bind(this)).addRollback(this.rollback.bind(this)).addRevokeRollback(this.revokeRollback.bind(this)).addEventListener("finally", this.createFinally()), this.eventInput.addKeyCombination($.commandName, this.shortcutKeys), this.eventInput.addEventListener("codeChange", async () => {
|
|
1601
|
+
this.eventInput.isKeyCombination($.commandName) && await this.commandManager.start($.commandName, [...this.default.selectLines]);
|
|
1553
1602
|
}), this.eventInput.addCancelDefaultBehavior(() => this.eventInput.isOnlyKeyDowns(this.shortcutKeys));
|
|
1554
1603
|
}
|
|
1555
1604
|
/**
|
|
1556
1605
|
* 进入命令约束
|
|
1557
1606
|
*/
|
|
1558
1607
|
constraint(e, t) {
|
|
1559
|
-
Array.isArray(t) ? e(t) : (
|
|
1608
|
+
Array.isArray(t) ? t.length === 0 ? (D({ message: "请选择线段", type: "warning" }), this.cancel()) : e(t) : (D({ message: "进入命令失败", type: "warning" }), this.cancel());
|
|
1560
1609
|
}
|
|
1561
1610
|
/** 开始
|
|
1562
1611
|
* @param next
|
|
1563
1612
|
*/
|
|
1564
1613
|
delete(e, t) {
|
|
1565
|
-
t.forEach((n) => this.renderManager.removeLine(n)),
|
|
1614
|
+
t.forEach((n) => this.renderManager.removeLine(n)), D({ message: "删除成功", type: "success" }), e(t);
|
|
1566
1615
|
}
|
|
1567
1616
|
/** 回滚操作
|
|
1568
1617
|
* @param data
|
|
@@ -1578,36 +1627,36 @@ class W extends T {
|
|
|
1578
1627
|
return e.forEach((t) => this.renderManager.removeLine(t)), e;
|
|
1579
1628
|
}
|
|
1580
1629
|
}
|
|
1581
|
-
class
|
|
1630
|
+
class ee extends V {
|
|
1582
1631
|
static name = "ConnectionLine";
|
|
1583
1632
|
shortcutKeys = ["Shift", "L"];
|
|
1584
1633
|
static commandName = "connectionLine";
|
|
1585
1634
|
onAddFromParent(e) {
|
|
1586
1635
|
super.onAddFromParent(e);
|
|
1587
|
-
const t = this.commandManager.addCommandFlow(
|
|
1588
|
-
t.addEventListener("finally", this.createFinally()), t.addEventListener("completed", (n) => this.completed(n.data)), this.eventInput.addKeyCombination(
|
|
1589
|
-
this.eventInput.isKeyCombination(
|
|
1636
|
+
const t = this.commandManager.addCommandFlow(ee.commandName).add(this.createInterrupt()).add(this.constraint.bind(this)).add(this.connection.bind(this)).addRollback(this.rollback.bind(this)).addRevokeRollback(this.revokeRollback.bind(this));
|
|
1637
|
+
t.addEventListener("finally", this.createFinally()), t.addEventListener("completed", (n) => this.completed(n.data)), this.eventInput.addKeyCombination(ee.commandName, this.shortcutKeys), this.eventInput.addEventListener("codeChange", async () => {
|
|
1638
|
+
this.eventInput.isKeyCombination(ee.commandName) && await this.commandManager.start(ee.commandName, [...this.default.selectLines]);
|
|
1590
1639
|
}), this.eventInput.addCancelDefaultBehavior(() => this.eventInput.isOnlyKeyDowns(this.shortcutKeys));
|
|
1591
1640
|
}
|
|
1592
1641
|
/**
|
|
1593
1642
|
* 进入命令约束
|
|
1594
1643
|
*/
|
|
1595
1644
|
constraint(e, t) {
|
|
1596
|
-
Array.isArray(t) ? t.length !== 2 ? (
|
|
1645
|
+
Array.isArray(t) ? t.length !== 2 ? (D({ message: "请选择2条线段", type: "warning" }), this.cancel()) : e(t) : (D({ message: "进入命令失败", type: "warning" }), this.cancel());
|
|
1597
1646
|
}
|
|
1598
1647
|
/** 连接
|
|
1599
1648
|
* @param next
|
|
1600
1649
|
*/
|
|
1601
1650
|
connection(e, t) {
|
|
1602
|
-
let n, o,
|
|
1603
|
-
for (let
|
|
1604
|
-
for (let
|
|
1605
|
-
const
|
|
1606
|
-
c <
|
|
1651
|
+
let n, o, a = 1 / 0;
|
|
1652
|
+
for (let s = 0; s < 2; s++)
|
|
1653
|
+
for (let r = 0; r < 2; r++) {
|
|
1654
|
+
const l = t[0].points[s], d = t[1].points[r], c = l.distance(d);
|
|
1655
|
+
c < a && (n = l, o = d, a = c);
|
|
1607
1656
|
}
|
|
1608
1657
|
if (n && o) {
|
|
1609
|
-
const
|
|
1610
|
-
e(
|
|
1658
|
+
const s = new ce(n.clone(), o.clone());
|
|
1659
|
+
e(s), D({ message: "连接成功", type: "success" });
|
|
1611
1660
|
} else this.cancel();
|
|
1612
1661
|
}
|
|
1613
1662
|
/** 成功
|
|
@@ -1631,33 +1680,33 @@ class U extends T {
|
|
|
1631
1680
|
return this.completed(e), e;
|
|
1632
1681
|
}
|
|
1633
1682
|
}
|
|
1634
|
-
class
|
|
1683
|
+
class te extends V {
|
|
1635
1684
|
static name = "IntersectionConnectionLine";
|
|
1636
1685
|
shortcutKeys = ["control", "Shift", "L"];
|
|
1637
1686
|
static commandName = "intersectionConnectionLine";
|
|
1638
1687
|
onAddFromParent(e) {
|
|
1639
1688
|
super.onAddFromParent(e);
|
|
1640
|
-
const t = this.commandManager.addCommandFlow(
|
|
1641
|
-
t.addEventListener("finally", this.createFinally()), t.addEventListener("completed", (n) => this.completed(n.data)), this.eventInput.addKeyCombination(
|
|
1642
|
-
this.eventInput.isKeyCombination(
|
|
1689
|
+
const t = this.commandManager.addCommandFlow(te.commandName).add(this.createInterrupt()).add(this.constraint.bind(this)).add(this.connection.bind(this)).addRollback(this.rollback.bind(this)).addRevokeRollback(this.revokeRollback.bind(this));
|
|
1690
|
+
t.addEventListener("finally", this.createFinally()), t.addEventListener("completed", (n) => this.completed(n.data)), this.eventInput.addKeyCombination(te.commandName, this.shortcutKeys), this.eventInput.addEventListener("codeChange", async () => {
|
|
1691
|
+
this.eventInput.isKeyCombination(te.commandName) && await this.commandManager.start(te.commandName, [...this.default.selectLines]);
|
|
1643
1692
|
}), this.eventInput.addCancelDefaultBehavior(() => this.eventInput.isOnlyKeyDowns(this.shortcutKeys));
|
|
1644
1693
|
}
|
|
1645
1694
|
/**
|
|
1646
1695
|
* 进入命令约束
|
|
1647
1696
|
*/
|
|
1648
1697
|
constraint(e, t) {
|
|
1649
|
-
Array.isArray(t) ? t.length !== 2 ? (
|
|
1698
|
+
Array.isArray(t) ? t.length !== 2 ? (D({ message: "请选择2条线段", type: "warning" }), this.cancel()) : e(t) : (D({ message: "进入命令失败", type: "warning" }), this.cancel());
|
|
1650
1699
|
}
|
|
1651
1700
|
/** 开始
|
|
1652
1701
|
* @param next
|
|
1653
1702
|
*/
|
|
1654
1703
|
connection(e, t) {
|
|
1655
|
-
const n = t[0], o = t[1],
|
|
1656
|
-
if (!
|
|
1657
|
-
const
|
|
1658
|
-
n.start.distance(
|
|
1659
|
-
const
|
|
1660
|
-
e({ line1: n, line2: o, oldLine1:
|
|
1704
|
+
const n = t[0], o = t[1], a = t[0].getIntersection(t[1]);
|
|
1705
|
+
if (!a) return;
|
|
1706
|
+
const s = n.points.map((c) => c.clone()), r = o.points.map((c) => c.clone());
|
|
1707
|
+
n.start.distance(a) < n.end.distance(a) ? n.start.copy(a) : n.end.copy(a), o.start.distance(a) < o.end.distance(a) ? o.start.copy(a) : o.end.copy(a);
|
|
1708
|
+
const l = n.points.map((c) => c.clone()), d = o.points.map((c) => c.clone());
|
|
1709
|
+
e({ line1: n, line2: o, oldLine1: s, oldLine2: r, newLine1: l, newLine2: d }), D({ message: "连接成功", type: "success" });
|
|
1661
1710
|
}
|
|
1662
1711
|
/** 执行完成
|
|
1663
1712
|
* @param next
|
|
@@ -1670,8 +1719,8 @@ class Q extends T {
|
|
|
1670
1719
|
* @param data
|
|
1671
1720
|
*/
|
|
1672
1721
|
rollback(e) {
|
|
1673
|
-
const { line1: t, line2: n, oldLine1: o, oldLine2:
|
|
1674
|
-
return this.renderManager.removeLine(t), this.renderManager.removeLine(n), t.set(...o), n.set(...
|
|
1722
|
+
const { line1: t, line2: n, oldLine1: o, oldLine2: a } = e;
|
|
1723
|
+
return this.renderManager.removeLine(t), this.renderManager.removeLine(n), t.set(...o), n.set(...a), this.renderManager.addLines([t, n]), this.renderManager.draw(), e;
|
|
1675
1724
|
}
|
|
1676
1725
|
/** 撤回回滚
|
|
1677
1726
|
* @param lines
|
|
@@ -1681,34 +1730,34 @@ class Q extends T {
|
|
|
1681
1730
|
return this.completed(e), e;
|
|
1682
1731
|
}
|
|
1683
1732
|
}
|
|
1684
|
-
class
|
|
1733
|
+
class ne extends V {
|
|
1685
1734
|
static name = "DeleteSelectWindow";
|
|
1686
1735
|
shortcutKeys = ["Q", "Delete"];
|
|
1687
1736
|
static commandName = "deleteSelectWindow";
|
|
1688
1737
|
onAddFromParent(e) {
|
|
1689
1738
|
super.onAddFromParent(e);
|
|
1690
|
-
const t = this.commandManager.addCommandFlow(
|
|
1691
|
-
t.addEventListener("finally", this.createFinally()), t.addEventListener("completed", (n) => this.completed(n.data)), this.eventInput.addKeyCombination(
|
|
1692
|
-
this.eventInput.isKeyCombination(
|
|
1739
|
+
const t = this.commandManager.addCommandFlow(ne.commandName).add(this.createInterrupt()).add(this.constraint.bind(this)).add(this.end.bind(this)).addRollback(this.rollback.bind(this)).addRevokeRollback(this.revokeRollback.bind(this));
|
|
1740
|
+
t.addEventListener("finally", this.createFinally()), t.addEventListener("completed", (n) => this.completed(n.data)), this.eventInput.addKeyCombination(ne.commandName, this.shortcutKeys), this.eventInput.addEventListener("codeChange", async () => {
|
|
1741
|
+
this.eventInput.isKeyCombination(ne.commandName) && await this.commandManager.start(ne.commandName, [...this.default.selectLines]);
|
|
1693
1742
|
}), this.eventInput.addCancelDefaultBehavior(() => this.eventInput.isOnlyKeyDowns(this.shortcutKeys));
|
|
1694
1743
|
}
|
|
1695
1744
|
/**
|
|
1696
1745
|
* 进入命令约束
|
|
1697
1746
|
*/
|
|
1698
1747
|
constraint(e, t) {
|
|
1699
|
-
Array.isArray(t) ? t.some((n) => n.userData.isWindow) ? e(t) : (
|
|
1748
|
+
Array.isArray(t) ? t.some((n) => n.userData.isWindow) ? e(t) : (D({ message: "请选择有窗户线段", type: "warning" }), this.cancel()) : (D({ message: "进入命令失败", type: "warning" }), this.cancel());
|
|
1700
1749
|
}
|
|
1701
1750
|
/** 开始
|
|
1702
1751
|
* @param next
|
|
1703
1752
|
*/
|
|
1704
1753
|
end(e, t) {
|
|
1705
1754
|
let n = !1, o = [];
|
|
1706
|
-
t.forEach((
|
|
1707
|
-
|
|
1708
|
-
line:
|
|
1709
|
-
drawDoorData:
|
|
1755
|
+
t.forEach((a) => {
|
|
1756
|
+
a.userData.isWindow && (o.push({
|
|
1757
|
+
line: a,
|
|
1758
|
+
drawDoorData: a.userData.drawDoorData
|
|
1710
1759
|
}), n = !0);
|
|
1711
|
-
}), n &&
|
|
1760
|
+
}), n && D({ message: "删除窗户成功", type: "success" }), e(o);
|
|
1712
1761
|
}
|
|
1713
1762
|
/**
|
|
1714
1763
|
* 完成
|
|
@@ -1738,16 +1787,16 @@ class Y extends T {
|
|
|
1738
1787
|
return this.completed(e), e;
|
|
1739
1788
|
}
|
|
1740
1789
|
}
|
|
1741
|
-
class
|
|
1790
|
+
class oe extends V {
|
|
1742
1791
|
static name = "SelectAll";
|
|
1743
1792
|
container = new m.Group();
|
|
1744
1793
|
shortcutKeys = ["control", "a"];
|
|
1745
1794
|
static commandName = "selectAll";
|
|
1746
1795
|
onAddFromParent(e) {
|
|
1747
1796
|
super.onAddFromParent(e), this.editor.container.add(this.container), this.container.position.z = 1e-3;
|
|
1748
|
-
const t = this.commandManager.addCommandFlow(
|
|
1749
|
-
t.writeOperationList = !1, t.addEventListener("finally", this.createFinally()), t.addEventListener("completed", (n) => this.completed(n.data)), this.eventInput.addKeyCombination(
|
|
1750
|
-
this.eventInput.isKeyCombination(
|
|
1797
|
+
const t = this.commandManager.addCommandFlow(oe.commandName).add(this.createInterrupt()).add(this.selectAll.bind(this)).addRollback(this.rollback.bind(this)).addRevokeRollback(this.revokeRollback.bind(this));
|
|
1798
|
+
t.writeOperationList = !1, t.addEventListener("finally", this.createFinally()), t.addEventListener("completed", (n) => this.completed(n.data)), this.eventInput.addKeyCombination(oe.commandName, this.shortcutKeys), this.eventInput.addEventListener("codeChange", async () => {
|
|
1799
|
+
this.eventInput.isKeyCombination(oe.commandName) && await this.commandManager.start(oe.commandName);
|
|
1751
1800
|
}), this.eventInput.addCancelDefaultBehavior(() => this.eventInput.isOnlyKeyDowns(this.shortcutKeys));
|
|
1752
1801
|
}
|
|
1753
1802
|
/** 开始
|
|
@@ -1775,67 +1824,119 @@ class Z extends T {
|
|
|
1775
1824
|
return this.completed(e), e;
|
|
1776
1825
|
}
|
|
1777
1826
|
}
|
|
1778
|
-
|
|
1827
|
+
class ae extends V {
|
|
1828
|
+
static name = "ViewAngle";
|
|
1829
|
+
shortcutKeys = ["r"];
|
|
1830
|
+
static commandName = "viewAngle";
|
|
1831
|
+
onAddFromParent(e) {
|
|
1832
|
+
super.onAddFromParent(e);
|
|
1833
|
+
const t = this.commandManager.addCommandFlow(ae.commandName).add(this.createInterrupt()).add(this.constraint.bind(this)).add(this.viewAngle.bind(this));
|
|
1834
|
+
t.writeOperationList = !1, t.addEventListener("finally", this.createFinally()), this.eventInput.addKeyCombination(ae.commandName, this.shortcutKeys), this.eventInput.addEventListener("codeChange", async () => {
|
|
1835
|
+
this.eventInput.isKeyCombination(ae.commandName) && await this.commandManager.start(ae.commandName, [...this.default.selectLines]);
|
|
1836
|
+
}), this.eventInput.addCancelDefaultBehavior(() => this.eventInput.isOnlyKeyDowns(this.shortcutKeys));
|
|
1837
|
+
}
|
|
1838
|
+
/**
|
|
1839
|
+
* 进入命令约束
|
|
1840
|
+
*/
|
|
1841
|
+
constraint(e, t) {
|
|
1842
|
+
Array.isArray(t) ? t.length !== 2 || !t[0].sameEndpoint(t[1]) ? (D({ message: "请选择两条具有端点相交的线段", type: "warning" }), this.cancel()) : e(t) : (D({ message: "进入命令失败", type: "warning" }), this.cancel());
|
|
1843
|
+
}
|
|
1844
|
+
/**
|
|
1845
|
+
*
|
|
1846
|
+
* @param next
|
|
1847
|
+
* @param selectLines
|
|
1848
|
+
*/
|
|
1849
|
+
viewAngle(e, t) {
|
|
1850
|
+
const [n, o] = t, a = Math.min(0.5, n.length(), o.length());
|
|
1851
|
+
let s, r, l, d = 0, c = 0;
|
|
1852
|
+
n.sameEndpointAsStart(o) ? (s = n.start, r = n.end) : (s = n.end, r = n.start), o.sameEndpointAsStart(n) ? l = o.end : l = o.start;
|
|
1853
|
+
function h(x, _) {
|
|
1854
|
+
const p = _.x - x.x, q = _.y - x.y;
|
|
1855
|
+
let R = Math.atan2(q, p) * (180 / Math.PI);
|
|
1856
|
+
return R < 0 && (R += 360), R;
|
|
1857
|
+
}
|
|
1858
|
+
const y = h(s, r), w = h(s, l), b = Math.min(y, w), f = Math.max(y, w), M = [];
|
|
1859
|
+
function L(x, _) {
|
|
1860
|
+
for (let p = x; p <= _; p++) {
|
|
1861
|
+
const q = Math.cos(p * Math.PI / 180) * a + s.x, R = Math.sin(p * Math.PI / 180) * a + s.y, Y = Math.cos((p + 1) * Math.PI / 180) * a + s.x, he = Math.sin((p + 1) * Math.PI / 180) * a + s.y;
|
|
1862
|
+
M.push(q, R, 0, Y, he, 0);
|
|
1863
|
+
}
|
|
1864
|
+
}
|
|
1865
|
+
f - b > 180 ? (L(0, b), L(f, 360), d = 360 - (f - b), c = (f + d / 2) % 360) : (L(b, f), d = f - b, c = b + d / 2);
|
|
1866
|
+
const A = new m.LineSegments();
|
|
1867
|
+
A.geometry = this.renderManager.createGeometry({
|
|
1868
|
+
position: M
|
|
1869
|
+
}, M.length / 3), A.material = new m.LineBasicMaterial({ color: 16711935 }), this.renderManager.container.add(A);
|
|
1870
|
+
const G = Math.cos(c * Math.PI / 180) * a + s.x, E = Math.sin(c * Math.PI / 180) * a + s.y, K = this.renderer.createText(Number(d.toFixed(2)), new m.Vector3(G, E, 0), {
|
|
1871
|
+
textShadow: "0px 0px 2px #000"
|
|
1872
|
+
}, this.renderManager.container);
|
|
1873
|
+
let k = 0;
|
|
1874
|
+
this.addEventRecord("clear").add(() => A.removeFromParent()).add(() => K.removeFromParent()).add(this.eventInput.addEventListener("codeChange", () => {
|
|
1875
|
+
this.eventInput.isOnlyKeyDown("enter") ? e() : this.eventInput.isOnlyKeyDown("mouse_0") && (k++, k === 1 ? setTimeout(() => k = 0, 500) : k === 2 && (e(), k = 0));
|
|
1876
|
+
}));
|
|
1877
|
+
}
|
|
1878
|
+
}
|
|
1879
|
+
const Yn = {
|
|
1779
1880
|
key: 0,
|
|
1780
1881
|
class: "mt-[5px] text-[#ccc] text-[11px] absolute left-[10px] bottom-[10px] rounded-[8px] min-w-[150px] bg-black/15 p-[10px]"
|
|
1781
|
-
},
|
|
1882
|
+
}, Xn = { class: "text-start max-w-[150px]" }, $n = { class: "inline-block ml-[10px] text-[var(--color-primary)]" }, eo = {
|
|
1782
1883
|
key: 0,
|
|
1783
1884
|
class: "p-[5px] max-w-[200px]"
|
|
1784
|
-
},
|
|
1885
|
+
}, to = { class: "text-[14px] flex flex-col" }, no = ["onClick"], oo = { class: "flex flex-row items-center" }, ao = { class: "flex justify-center items-center size-[20px] bg-[#f0f0f0] rounded-[2px] mr-[10px]" }, so = ["src"], io = { class: "text-wrap" }, ro = {
|
|
1785
1886
|
key: 1,
|
|
1786
1887
|
class: "text-[#999]"
|
|
1787
|
-
},
|
|
1888
|
+
}, lo = {
|
|
1788
1889
|
style: { "--el-color-primary": "var(--primary-color)" },
|
|
1789
1890
|
class: "flex flex-row items-center justify-between gap-[10px] mt-[10px] text-[10px]"
|
|
1790
|
-
},
|
|
1891
|
+
}, co = {
|
|
1791
1892
|
key: 0,
|
|
1792
1893
|
class: "flex flex-row items-center flex-wrap justify-between gap-[10px] mt-[10px] text-[10px]"
|
|
1793
|
-
},
|
|
1894
|
+
}, mo = { class: "flex-wrap border-t-1 border-t-[#eee] mt-[5px] pt-[5px] flex items-center gap-[10px]" }, ho = ["onClick", "title"], uo = ["src"], po = /* @__PURE__ */ me({
|
|
1794
1895
|
__name: "EditorTool",
|
|
1795
1896
|
props: {
|
|
1796
1897
|
dxfSystem: {},
|
|
1797
1898
|
permission: {}
|
|
1798
1899
|
},
|
|
1799
|
-
setup(
|
|
1800
|
-
function e(
|
|
1801
|
-
const
|
|
1802
|
-
|
|
1900
|
+
setup(i) {
|
|
1901
|
+
function e(C, u, v = h.value.getBoundingClientRect(), U = y.value.getBoundingClientRect()) {
|
|
1902
|
+
const ue = v.width - U.width, pe = 0, Le = v.height - U.height;
|
|
1903
|
+
C = Math.max(0, Math.min(C, ue)), u = Math.max(pe, Math.min(u, Le)), k.value = { left: C, top: u };
|
|
1803
1904
|
}
|
|
1804
|
-
function t(
|
|
1805
|
-
|
|
1905
|
+
function t(C) {
|
|
1906
|
+
b.value === C.command || b.value !== "default" || L.commandManager.start(C.command);
|
|
1806
1907
|
}
|
|
1807
|
-
function n(
|
|
1808
|
-
if (
|
|
1809
|
-
localStorage.setItem("lines", JSON.stringify(
|
|
1908
|
+
function n(C) {
|
|
1909
|
+
if (C) {
|
|
1910
|
+
localStorage.setItem("lines", JSON.stringify(C));
|
|
1810
1911
|
try {
|
|
1811
|
-
|
|
1912
|
+
f.Dxf.set(C), f.Dxf.lineOffset();
|
|
1812
1913
|
} catch (u) {
|
|
1813
1914
|
console.log(u);
|
|
1814
1915
|
}
|
|
1815
1916
|
}
|
|
1816
1917
|
}
|
|
1817
1918
|
async function o() {
|
|
1818
|
-
const
|
|
1819
|
-
Array.isArray(
|
|
1919
|
+
const C = await kt.json();
|
|
1920
|
+
Array.isArray(C) && (localStorage.removeItem("orbitControls"), n(C));
|
|
1820
1921
|
}
|
|
1821
|
-
function
|
|
1822
|
-
|
|
1823
|
-
const
|
|
1922
|
+
function a({ offsetX: C, offsetY: u }) {
|
|
1923
|
+
M.mouseMoveEventProxylock = !0;
|
|
1924
|
+
const v = document.body.style.cursor;
|
|
1824
1925
|
document.body.style.cursor = "move";
|
|
1825
|
-
const
|
|
1826
|
-
const
|
|
1926
|
+
const U = (ue) => {
|
|
1927
|
+
const pe = h.value.getBoundingClientRect(), Le = y.value.getBoundingClientRect();
|
|
1827
1928
|
e(
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
),
|
|
1833
|
-
},
|
|
1834
|
-
document.body.removeEventListener("mousemove",
|
|
1929
|
+
ue.pageX - pe.left - C,
|
|
1930
|
+
ue.pageY - pe.top - u,
|
|
1931
|
+
pe,
|
|
1932
|
+
Le
|
|
1933
|
+
), ue.stopPropagation(), document.body.style.cursor = "move";
|
|
1934
|
+
}, Me = () => {
|
|
1935
|
+
document.body.removeEventListener("mousemove", U), document.removeEventListener("mouseup", Me), document.body.style.cursor = v, M.mouseMoveEventProxylock = !1;
|
|
1835
1936
|
};
|
|
1836
|
-
document.body.addEventListener("mousemove",
|
|
1937
|
+
document.body.addEventListener("mousemove", U), document.addEventListener("mouseup", Me);
|
|
1837
1938
|
}
|
|
1838
|
-
const
|
|
1939
|
+
const s = i, r = S(!0), l = S(!0), d = S(!0), c = S(!1), h = S(), y = S(), w = S(!0), b = S(""), f = St(s.dxfSystem), M = f.findComponentByType(Lt), L = f.findComponentByType(rt), A = f.findComponentByType(Be), G = f.findComponentByType(It), E = S(0), K = S(0), k = S({ left: 10, top: 10 }), x = /* @__PURE__ */ Object.assign({ "./assets/images/angle.svg": yn, "./assets/images/connection.svg": bn, "./assets/images/deleteSelectLine.svg": xn, "./assets/images/deleteSelectWindow.svg": Mn, "./assets/images/door.svg": kn, "./assets/images/intersectionConnection.svg": Dn, "./assets/images/line.svg": An, "./assets/images/mergeLine.svg": Bn, "./assets/images/revokeRollback.svg": Nn, "./assets/images/rollback.svg": Rn, "./assets/images/selectAll.svg": Fn, "./assets/images/selectPoint.svg": Tn, "./assets/images/verticalCorrection.svg": jn, "./assets/images/window.svg": Qn }), _ = S(!1), p = S(0), q = S(!1), R = new ResizeObserver(() => e(k.value.left, k.value.top)), Y = [
|
|
1839
1940
|
{ name: "开启绘制线段命令", shortcut: "Ctrl + L" },
|
|
1840
1941
|
{ name: "开启绘制门线命令", shortcut: "Ctrl + M" },
|
|
1841
1942
|
{ name: "开启绘制窗户线命令", shortcut: "Ctrl + Q" },
|
|
@@ -1855,7 +1956,7 @@ const qn = {
|
|
|
1855
1956
|
{ name: "取消命令", shortcut: "Esc" },
|
|
1856
1957
|
{ name: "回滚操作", shortcut: "Ctrl + Z" },
|
|
1857
1958
|
{ name: "取消回滚操作", shortcut: "Ctrl + Y" }
|
|
1858
|
-
],
|
|
1959
|
+
], he = [
|
|
1859
1960
|
{
|
|
1860
1961
|
command: "default",
|
|
1861
1962
|
name: "默认",
|
|
@@ -1865,7 +1966,7 @@ const qn = {
|
|
|
1865
1966
|
{
|
|
1866
1967
|
command: "draw-line",
|
|
1867
1968
|
name: "绘制线段",
|
|
1868
|
-
src:
|
|
1969
|
+
src: x["./assets/images/line.svg"].default,
|
|
1869
1970
|
show: !0,
|
|
1870
1971
|
shortcut: "Ctrl + L"
|
|
1871
1972
|
},
|
|
@@ -1873,199 +1974,206 @@ const qn = {
|
|
|
1873
1974
|
command: "draw-door-line",
|
|
1874
1975
|
name: "绘制门线",
|
|
1875
1976
|
show: !0,
|
|
1876
|
-
src:
|
|
1977
|
+
src: x["./assets/images/door.svg"].default,
|
|
1877
1978
|
shortcut: "Ctrl + M"
|
|
1878
1979
|
},
|
|
1879
1980
|
{
|
|
1880
1981
|
command: "draw-window-line",
|
|
1881
1982
|
name: "绘制窗户线",
|
|
1882
1983
|
show: !0,
|
|
1883
|
-
src:
|
|
1984
|
+
src: x["./assets/images/window.svg"].default,
|
|
1884
1985
|
shortcut: "Ctrl + Q"
|
|
1885
1986
|
},
|
|
1886
1987
|
{
|
|
1887
1988
|
command: "point",
|
|
1888
1989
|
name: "点修改",
|
|
1889
1990
|
show: !0,
|
|
1890
|
-
src:
|
|
1991
|
+
src: x["./assets/images/selectPoint.svg"].default,
|
|
1891
1992
|
shortcut: "Ctrl + P"
|
|
1892
1993
|
}
|
|
1893
|
-
],
|
|
1994
|
+
], dt = [
|
|
1894
1995
|
{
|
|
1895
1996
|
command: "",
|
|
1896
1997
|
name: "操作回滚",
|
|
1897
|
-
src:
|
|
1898
|
-
show:
|
|
1998
|
+
src: x["./assets/images/rollback.svg"].default,
|
|
1999
|
+
show: B(() => E.value !== 0),
|
|
1899
2000
|
shortcut: "Ctrl + Z",
|
|
1900
2001
|
action() {
|
|
1901
|
-
|
|
2002
|
+
L.commandManager.rollback();
|
|
1902
2003
|
}
|
|
1903
2004
|
},
|
|
1904
2005
|
{
|
|
1905
2006
|
command: "",
|
|
1906
2007
|
name: "撤销操作回滚",
|
|
1907
|
-
src:
|
|
1908
|
-
show:
|
|
2008
|
+
src: x["./assets/images/revokeRollback.svg"].default,
|
|
2009
|
+
show: B(() => K.value !== 0),
|
|
1909
2010
|
shortcut: "Ctrl + Y",
|
|
1910
2011
|
class: "rotateY-[180deg]",
|
|
1911
2012
|
action() {
|
|
1912
|
-
|
|
2013
|
+
L.commandManager.revokeRollback();
|
|
1913
2014
|
}
|
|
1914
2015
|
},
|
|
1915
2016
|
{
|
|
1916
|
-
command:
|
|
2017
|
+
command: X.commandName,
|
|
1917
2018
|
name: "合并",
|
|
1918
|
-
src:
|
|
1919
|
-
show:
|
|
2019
|
+
src: x["./assets/images/mergeLine.svg"].default,
|
|
2020
|
+
show: B(() => p.value === 2),
|
|
1920
2021
|
shortcut: "Ctrl + G"
|
|
1921
2022
|
},
|
|
1922
2023
|
{
|
|
1923
|
-
command:
|
|
2024
|
+
command: ee.commandName,
|
|
1924
2025
|
name: "两点连接",
|
|
1925
|
-
show:
|
|
1926
|
-
src:
|
|
2026
|
+
show: B(() => p.value === 2),
|
|
2027
|
+
src: x["./assets/images/connection.svg"].default,
|
|
1927
2028
|
shortcut: "Shift + L"
|
|
1928
2029
|
},
|
|
1929
2030
|
{
|
|
1930
|
-
command:
|
|
2031
|
+
command: te.commandName,
|
|
1931
2032
|
name: "延长线交点连接",
|
|
1932
|
-
show:
|
|
1933
|
-
src:
|
|
2033
|
+
show: B(() => p.value === 2),
|
|
2034
|
+
src: x["./assets/images/intersectionConnection.svg"].default,
|
|
1934
2035
|
shortcut: "Ctrl + Shift + L"
|
|
1935
2036
|
},
|
|
1936
2037
|
{
|
|
1937
|
-
command:
|
|
2038
|
+
command: de.commandName,
|
|
1938
2039
|
name: "线段垂直纠正",
|
|
1939
|
-
show:
|
|
1940
|
-
src:
|
|
2040
|
+
show: B(() => p.value === 1),
|
|
2041
|
+
src: x["./assets/images/verticalCorrection.svg"].default,
|
|
1941
2042
|
shortcut: "Ctrl + C 或 Ctrl + Shift + C"
|
|
1942
2043
|
},
|
|
1943
2044
|
{
|
|
1944
|
-
command:
|
|
2045
|
+
command: ae.commandName,
|
|
2046
|
+
name: "角度显示",
|
|
2047
|
+
show: B(() => p.value === 2 && A.selectLines[0].sameEndpoint(A.selectLines[1])),
|
|
2048
|
+
src: x["./assets/images/angle.svg"].default,
|
|
2049
|
+
shortcut: "r"
|
|
2050
|
+
},
|
|
2051
|
+
{
|
|
2052
|
+
command: oe.commandName,
|
|
1945
2053
|
name: "全选",
|
|
1946
|
-
show:
|
|
1947
|
-
src:
|
|
2054
|
+
show: B(() => p.value !== L.renderManager.lines.length),
|
|
2055
|
+
src: x["./assets/images/selectAll.svg"].default,
|
|
1948
2056
|
shortcut: "Ctrl + A"
|
|
1949
2057
|
},
|
|
1950
2058
|
{
|
|
1951
|
-
command:
|
|
2059
|
+
command: ne.commandName,
|
|
1952
2060
|
name: "清除窗户",
|
|
1953
|
-
show:
|
|
1954
|
-
src:
|
|
2061
|
+
show: B(() => q.value),
|
|
2062
|
+
src: x["./assets/images/deleteSelectWindow.svg"].default,
|
|
1955
2063
|
shortcut: "Q + Delete"
|
|
1956
2064
|
},
|
|
1957
2065
|
{
|
|
1958
|
-
command:
|
|
2066
|
+
command: $.commandName,
|
|
1959
2067
|
name: "删除",
|
|
1960
|
-
show:
|
|
1961
|
-
src:
|
|
2068
|
+
show: B(() => p.value > 0),
|
|
2069
|
+
src: x["./assets/images/deleteSelectLine.svg"].default,
|
|
1962
2070
|
shortcut: "Delete"
|
|
1963
2071
|
}
|
|
1964
2072
|
];
|
|
1965
|
-
|
|
1966
|
-
localStorage.setItem("toolBarExpand",
|
|
1967
|
-
}),
|
|
1968
|
-
const
|
|
1969
|
-
|
|
2073
|
+
J(k, () => localStorage.setItem("editorToolPosition", JSON.stringify(k.value))), J(_, () => localStorage.setItem("showShortcutKey", _.value + "")), J(w, () => {
|
|
2074
|
+
localStorage.setItem("toolBarExpand", w.value + ""), w.value && be(() => e(k.value.left, k.value.top));
|
|
2075
|
+
}), J(r, () => f.Variable.set("originalLineVisible", r.value)), J(l, () => f.Variable.set("dxfVisible", l.value)), J(d, () => f.Variable.set("whiteModelVisible", d.value)), f.Variable.addEventListener("isLook", (C) => c.value = C.value), f.Variable.addEventListener("originalLineVisible", (C) => r.value = C.value), f.Variable.addEventListener("dxfVisible", (C) => l.value = C.value), f.Variable.addEventListener("whiteModelVisible", (C) => d.value = C.value);
|
|
2076
|
+
const lt = L.commandManager.addEventListener("started", (C) => {
|
|
2077
|
+
b.value = C.name;
|
|
1970
2078
|
});
|
|
1971
|
-
return localStorage.getItem("showShortcutKey") && (
|
|
1972
|
-
|
|
1973
|
-
if (
|
|
1974
|
-
const { left:
|
|
1975
|
-
e(
|
|
2079
|
+
return localStorage.getItem("showShortcutKey") && (_.value = localStorage.getItem("showShortcutKey") === "true"), localStorage.getItem("toolBarExpand") && (w.value = localStorage.getItem("toolBarExpand") === "true"), tt(() => {
|
|
2080
|
+
y.value.style.display = "none", setTimeout(() => {
|
|
2081
|
+
if (y.value.style.display = "block", localStorage.getItem("editorToolPosition")) {
|
|
2082
|
+
const { left: C, top: u } = JSON.parse(localStorage.getItem("editorToolPosition") ?? "{}");
|
|
2083
|
+
e(C, u), be(() => R.observe(h.value));
|
|
1976
2084
|
} else
|
|
1977
|
-
|
|
1978
|
-
}, 100),
|
|
1979
|
-
|
|
1980
|
-
}), ["rollback", "completed", "revokeRollback"].forEach((
|
|
1981
|
-
|
|
2085
|
+
be(() => R.observe(h.value));
|
|
2086
|
+
}, 100), A.addEventListener("selectLineChange", () => {
|
|
2087
|
+
p.value = A.selectLines.length, q.value = A.selectLines.some((C) => C.userData.isWindow);
|
|
2088
|
+
}), ["rollback", "completed", "revokeRollback"].forEach((C) => {
|
|
2089
|
+
L.commandManager.addEventListener(C, () => {
|
|
1982
2090
|
setTimeout(() => {
|
|
1983
|
-
|
|
2091
|
+
E.value = L.commandManager.operationList.length, K.value = L.commandManager.rollbackList.length;
|
|
1984
2092
|
});
|
|
1985
2093
|
});
|
|
1986
2094
|
});
|
|
1987
|
-
}),
|
|
1988
|
-
|
|
1989
|
-
}), (
|
|
2095
|
+
}), Bt(() => {
|
|
2096
|
+
M.mouseMoveEventProxylock = !1, lt(), R.disconnect();
|
|
2097
|
+
}), (C, u) => (P(), O("div", {
|
|
1990
2098
|
ref_key: "elRef",
|
|
1991
2099
|
ref: h,
|
|
1992
2100
|
class: "editorTool pointer-events-none overflow-hidden absolute left-0 top-0 w-full h-full z-[20] flex flex-row justify-between p-[5px] box-border select-none pointer-events-[all]"
|
|
1993
2101
|
}, [
|
|
1994
|
-
|
|
1995
|
-
default:
|
|
1996
|
-
|
|
1997
|
-
(
|
|
2102
|
+
F(xe, null, {
|
|
2103
|
+
default: j(() => [
|
|
2104
|
+
_.value ? (P(), O("div", Yn, [
|
|
2105
|
+
(P(), O(fe, null, Ie(Y, (v) => I("div", {
|
|
1998
2106
|
class: "p-[4px_0px] flex justify-between text-right border-b-1 border-b-[rgba(255,255,255,0.1)] last-of-type:border-b-0",
|
|
1999
|
-
key:
|
|
2107
|
+
key: v.name
|
|
2000
2108
|
}, [
|
|
2001
|
-
|
|
2002
|
-
|
|
2109
|
+
I("p", Xn, ie(v.name), 1),
|
|
2110
|
+
I("span", $n, ie(v.shortcut), 1)
|
|
2003
2111
|
])), 64))
|
|
2004
|
-
])) :
|
|
2112
|
+
])) : Z("", !0)
|
|
2005
2113
|
]),
|
|
2006
2114
|
_: 1
|
|
2007
2115
|
}),
|
|
2008
|
-
|
|
2116
|
+
I("div", {
|
|
2009
2117
|
ref_key: "toolBarRef",
|
|
2010
|
-
ref:
|
|
2011
|
-
style:
|
|
2012
|
-
class:
|
|
2013
|
-
onMousedown: u[
|
|
2118
|
+
ref: y,
|
|
2119
|
+
style: Se({ left: k.value.left + "px", top: k.value.top + "px" }),
|
|
2120
|
+
class: T(["overflow-hidden pointer-events-auto w-fit max-w-[260px] transition-[border-radius] text-[#333] absolute z-[11] bg-white select-none", { "rounded-[8px] ": w.value }]),
|
|
2121
|
+
onMousedown: u[9] || (u[9] = (v) => v.stopPropagation())
|
|
2014
2122
|
}, [
|
|
2015
|
-
|
|
2016
|
-
onMousedown:
|
|
2017
|
-
class:
|
|
2123
|
+
I("div", {
|
|
2124
|
+
onMousedown: a,
|
|
2125
|
+
class: T([{ "border-b-[#eee] border-b-1": w.value }, "flex flex-row justify-between header text-[14px] font-bold p-[10px 0px]"])
|
|
2018
2126
|
}, [
|
|
2019
|
-
u[
|
|
2020
|
-
|
|
2021
|
-
onMousedown: u[0] || (u[0] = (
|
|
2022
|
-
onClick: u[1] || (u[1] = (
|
|
2127
|
+
u[11] || (u[11] = _t('<div class="flex flex-row" data-v-304aacf0><div class="p-[2px_5px] flex items-center pointer-events-none" data-v-304aacf0><svg fill="#aaa" width="20" height="20" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" data-v-304aacf0><path d="M341.333333 298.666667a85.333333 85.333333 0 1 0 0-170.666667 85.333333 85.333333 0 0 0 0 170.666667z m0 298.666666a85.333333 85.333333 0 1 0 0-170.666666 85.333333 85.333333 0 0 0 0 170.666666z m85.333334 213.333334a85.333333 85.333333 0 1 1-170.666667 0 85.333333 85.333333 0 0 1 170.666667 0z m256-512a85.333333 85.333333 0 1 0 0-170.666667 85.333333 85.333333 0 0 0 0 170.666667z m85.333333 213.333333a85.333333 85.333333 0 1 1-170.666667 0 85.333333 85.333333 0 0 1 170.666667 0z m-85.333333 384a85.333333 85.333333 0 1 0 0-170.666667 85.333333 85.333333 0 0 0 0 170.666667z" data-v-304aacf0></path></svg></div><h5 class="flex text-nowrap text-[12px] items-center pointer-events-none" data-v-304aacf0>绘制工具</h5></div>', 1)),
|
|
2128
|
+
I("div", {
|
|
2129
|
+
onMousedown: u[0] || (u[0] = (v) => v.stopPropagation()),
|
|
2130
|
+
onClick: u[1] || (u[1] = (v) => w.value = !w.value),
|
|
2023
2131
|
class: "cursor-pointer flex items-center p-[0px_5px]"
|
|
2024
2132
|
}, [
|
|
2025
|
-
(
|
|
2133
|
+
(P(), O("svg", {
|
|
2026
2134
|
fill: "#666",
|
|
2027
|
-
class:
|
|
2135
|
+
class: T([{ "rotate-90": w.value }, "transition-all"]),
|
|
2028
2136
|
viewBox: "0 0 1024 1024",
|
|
2029
2137
|
version: "1.1",
|
|
2030
2138
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2031
2139
|
width: "12",
|
|
2032
2140
|
height: "12"
|
|
2033
|
-
}, u[
|
|
2034
|
-
|
|
2141
|
+
}, u[10] || (u[10] = [
|
|
2142
|
+
I("path", { d: "M315.050667 938.666667a60.757333 60.757333 0 0 0 41.813333-16.298667L750.933333 551.338667a53.418667 53.418667 0 0 0 0-78.677334L356.864 101.632a61.696 61.696 0 0 0-83.541333 0 53.418667 53.418667 0 0 0-0.256 78.677333L625.408 512 273.066667 843.690667a53.418667 53.418667 0 0 0 0 78.677333 60.757333 60.757333 0 0 0 41.984 16.298667z" }, null, -1)
|
|
2035
2143
|
]), 2))
|
|
2036
2144
|
], 32)
|
|
2037
2145
|
], 34),
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
(
|
|
2041
|
-
key:
|
|
2146
|
+
w.value ? (P(), O("div", eo, [
|
|
2147
|
+
I("ul", to, [
|
|
2148
|
+
(P(), O(fe, null, Ie(he, (v) => (P(), O(fe, {
|
|
2149
|
+
key: v.command
|
|
2042
2150
|
}, [
|
|
2043
|
-
|
|
2151
|
+
v.show ? (P(), O("li", {
|
|
2044
2152
|
key: 0,
|
|
2045
|
-
onClick: (
|
|
2046
|
-
class:
|
|
2047
|
-
"!bg-[var(--primary-color)] text-[#fff]":
|
|
2048
|
-
"!cursor-no-drop":
|
|
2153
|
+
onClick: (U) => t(v),
|
|
2154
|
+
class: T([{
|
|
2155
|
+
"!bg-[var(--primary-color)] text-[#fff]": b.value === v.command,
|
|
2156
|
+
"!cursor-no-drop": b.value !== v.command && b.value !== "default"
|
|
2049
2157
|
}, "gap-[10px] text-[12px] hover:bg-[#ddd] transition-all rounded-[6px] p-[5px] flex flex-row items-center justify-between cursor-pointer"])
|
|
2050
2158
|
}, [
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2159
|
+
I("div", oo, [
|
|
2160
|
+
I("div", ao, [
|
|
2161
|
+
I("img", {
|
|
2054
2162
|
class: "size-[14px]",
|
|
2055
|
-
src:
|
|
2163
|
+
src: v.src,
|
|
2056
2164
|
alt: "",
|
|
2057
2165
|
srcset: ""
|
|
2058
|
-
}, null, 8,
|
|
2166
|
+
}, null, 8, so)
|
|
2059
2167
|
]),
|
|
2060
|
-
|
|
2168
|
+
I("span", io, ie(v.name), 1)
|
|
2061
2169
|
]),
|
|
2062
|
-
|
|
2170
|
+
b.value === v.command ? (P(), O("div", {
|
|
2063
2171
|
key: 0,
|
|
2064
2172
|
title: "取消命令(Esc)",
|
|
2065
2173
|
class: "active:scale-[0.7] transition-all",
|
|
2066
|
-
onClick: u[2] || (u[2] = (
|
|
2067
|
-
}, u[
|
|
2068
|
-
|
|
2174
|
+
onClick: u[2] || (u[2] = (U) => (g(L).cancelCommand(), U.stopPropagation()))
|
|
2175
|
+
}, u[12] || (u[12] = [
|
|
2176
|
+
I("svg", {
|
|
2069
2177
|
fill: "#fff",
|
|
2070
2178
|
width: "16",
|
|
2071
2179
|
height: "16",
|
|
@@ -2073,96 +2181,108 @@ const qn = {
|
|
|
2073
2181
|
version: "1.1",
|
|
2074
2182
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2075
2183
|
}, [
|
|
2076
|
-
|
|
2077
|
-
|
|
2184
|
+
I("path", { d: "M511.104 0C228.821333 0 0 228.821333 0 511.104c0 282.282667 228.821333 511.104 511.104 511.104 282.282667 0 511.104-228.842667 511.104-511.104C1022.208 228.821333 793.386667 0 511.104 0zM511.104 898.496c-213.973333 0-387.434667-173.44-387.434667-387.413333 0-213.952 173.44-387.413333 387.434667-387.413333 213.952 0 387.392 173.44 387.392 387.413333C898.496 725.056 725.056 898.496 511.104 898.496z" }),
|
|
2185
|
+
I("path", { d: "M236.437333 463.914667l549.333333 0 0 96.874667-549.333333 0 0-96.874667Z" })
|
|
2078
2186
|
], -1)
|
|
2079
|
-
]))) :
|
|
2080
|
-
], 10,
|
|
2187
|
+
]))) : v.shortcut ? (P(), O("div", ro, ie(v.shortcut), 1)) : Z("", !0)
|
|
2188
|
+
], 10, no)) : Z("", !0)
|
|
2081
2189
|
], 64))), 64))
|
|
2082
2190
|
]),
|
|
2083
|
-
|
|
2084
|
-
|
|
2191
|
+
I("div", lo, [
|
|
2192
|
+
F(g(Ke), {
|
|
2085
2193
|
size: "small",
|
|
2086
|
-
modelValue:
|
|
2087
|
-
"onUpdate:modelValue": u[3] || (u[3] = (
|
|
2194
|
+
modelValue: _.value,
|
|
2195
|
+
"onUpdate:modelValue": u[3] || (u[3] = (v) => _.value = v),
|
|
2088
2196
|
label: "快捷键提示"
|
|
2089
2197
|
}, null, 8, ["modelValue"]),
|
|
2090
|
-
|
|
2198
|
+
F(g(Ke), {
|
|
2091
2199
|
size: "small",
|
|
2092
|
-
modelValue:
|
|
2093
|
-
"onUpdate:modelValue": u[4] || (u[4] = (
|
|
2200
|
+
modelValue: l.value,
|
|
2201
|
+
"onUpdate:modelValue": u[4] || (u[4] = (v) => l.value = v),
|
|
2094
2202
|
label: "dxf"
|
|
2095
2203
|
}, null, 8, ["modelValue"])
|
|
2096
2204
|
]),
|
|
2097
|
-
|
|
2098
|
-
|
|
2205
|
+
C.permission === "admin" ? (P(), O("div", co, [
|
|
2206
|
+
F(g(ge), {
|
|
2099
2207
|
style: { padding: "5px", "font-size": "10px" },
|
|
2100
2208
|
size: "small",
|
|
2101
2209
|
type: "success",
|
|
2102
2210
|
onClick: o
|
|
2103
2211
|
}, {
|
|
2104
|
-
default:
|
|
2105
|
-
|
|
2212
|
+
default: j(() => u[13] || (u[13] = [
|
|
2213
|
+
se(" 选择文件 ", -1)
|
|
2106
2214
|
])),
|
|
2107
2215
|
_: 1,
|
|
2108
|
-
__: [
|
|
2216
|
+
__: [13]
|
|
2109
2217
|
}),
|
|
2110
|
-
|
|
2218
|
+
F(g(ge), {
|
|
2111
2219
|
style: { padding: "5px", "font-size": "10px" },
|
|
2112
2220
|
size: "small",
|
|
2113
2221
|
type: "primary",
|
|
2114
|
-
onClick: u[5] || (u[5] = (
|
|
2222
|
+
onClick: u[5] || (u[5] = (v) => console.log(g(f).Dxf.originalData))
|
|
2115
2223
|
}, {
|
|
2116
|
-
default:
|
|
2117
|
-
|
|
2224
|
+
default: j(() => u[14] || (u[14] = [
|
|
2225
|
+
se(" 打印Json ", -1)
|
|
2118
2226
|
])),
|
|
2119
2227
|
_: 1,
|
|
2120
|
-
__: [
|
|
2228
|
+
__: [14]
|
|
2121
2229
|
}),
|
|
2122
|
-
|
|
2230
|
+
F(g(ge), {
|
|
2123
2231
|
style: { padding: "5px", "font-size": "10px" },
|
|
2124
2232
|
size: "small",
|
|
2125
2233
|
type: "primary",
|
|
2126
|
-
onClick: u[6] || (u[6] = (
|
|
2234
|
+
onClick: u[6] || (u[6] = (v) => g(f).Dxf.download("test.dxf"))
|
|
2127
2235
|
}, {
|
|
2128
|
-
default:
|
|
2129
|
-
|
|
2236
|
+
default: j(() => u[15] || (u[15] = [
|
|
2237
|
+
se(" 下载DXF ", -1)
|
|
2130
2238
|
])),
|
|
2131
2239
|
_: 1,
|
|
2132
|
-
__: [
|
|
2240
|
+
__: [15]
|
|
2133
2241
|
}),
|
|
2134
|
-
|
|
2242
|
+
F(g(ge), {
|
|
2135
2243
|
style: { padding: "5px", "font-size": "10px" },
|
|
2136
2244
|
size: "small",
|
|
2137
2245
|
type: "primary",
|
|
2138
|
-
onClick: u[7] || (u[7] = (
|
|
2246
|
+
onClick: u[7] || (u[7] = (v) => g(f).AngleCorrectionDxf.downloadImage("dxf.jpg"))
|
|
2139
2247
|
}, {
|
|
2140
|
-
default:
|
|
2141
|
-
|
|
2248
|
+
default: j(() => u[16] || (u[16] = [
|
|
2249
|
+
se(" 下载JPG ", -1)
|
|
2142
2250
|
])),
|
|
2143
2251
|
_: 1,
|
|
2144
|
-
__: [
|
|
2252
|
+
__: [16]
|
|
2253
|
+
}),
|
|
2254
|
+
F(g(ge), {
|
|
2255
|
+
style: { padding: "5px", "font-size": "10px" },
|
|
2256
|
+
size: "small",
|
|
2257
|
+
type: "primary",
|
|
2258
|
+
onClick: u[8] || (u[8] = (v) => g(G).downloadGltf("test.glb", !0))
|
|
2259
|
+
}, {
|
|
2260
|
+
default: j(() => u[17] || (u[17] = [
|
|
2261
|
+
se(" 下载白膜 ", -1)
|
|
2262
|
+
])),
|
|
2263
|
+
_: 1,
|
|
2264
|
+
__: [17]
|
|
2145
2265
|
})
|
|
2146
|
-
])) :
|
|
2147
|
-
|
|
2148
|
-
default:
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
default:
|
|
2152
|
-
(
|
|
2153
|
-
onClick: (
|
|
2154
|
-
title: `${
|
|
2155
|
-
class:
|
|
2156
|
-
"opacity-30 bg-[#ccc] !cursor-no-drop active:!scale-[1]": !
|
|
2157
|
-
[
|
|
2266
|
+
])) : Z("", !0),
|
|
2267
|
+
F(xe, null, {
|
|
2268
|
+
default: j(() => [
|
|
2269
|
+
I("div", mo, [
|
|
2270
|
+
F(Nt, null, {
|
|
2271
|
+
default: j(() => [
|
|
2272
|
+
(P(), O(fe, null, Ie(dt, (v) => I("div", {
|
|
2273
|
+
onClick: (U) => v.show.value && b.value === "default" && (v.action ? v.action() : g(L).commandManager.start(v.command, [...g(A).selectLines])),
|
|
2274
|
+
title: `${v.name}(${v.shortcut})`,
|
|
2275
|
+
class: T(["size-[20px] flex justify-center items-center relative overflow-hidden active:scale-[0.8] border-1 border-[#ccc] rounded-[4px] transition-all cursor-pointer", {
|
|
2276
|
+
"opacity-30 bg-[#ccc] !cursor-no-drop active:!scale-[1]": !v.show.value || b.value !== "default",
|
|
2277
|
+
[v.class ?? ""]: !0
|
|
2158
2278
|
}]),
|
|
2159
|
-
key:
|
|
2279
|
+
key: v.command
|
|
2160
2280
|
}, [
|
|
2161
|
-
|
|
2281
|
+
I("img", {
|
|
2162
2282
|
class: "size-[14px]",
|
|
2163
|
-
src:
|
|
2164
|
-
}, null, 8,
|
|
2165
|
-
], 10,
|
|
2283
|
+
src: v.src
|
|
2284
|
+
}, null, 8, uo)
|
|
2285
|
+
], 10, ho)), 64))
|
|
2166
2286
|
]),
|
|
2167
2287
|
_: 1
|
|
2168
2288
|
})
|
|
@@ -2170,17 +2290,17 @@ const qn = {
|
|
|
2170
2290
|
]),
|
|
2171
2291
|
_: 1
|
|
2172
2292
|
})
|
|
2173
|
-
])) :
|
|
2293
|
+
])) : Z("", !0)
|
|
2174
2294
|
], 38)
|
|
2175
2295
|
], 512));
|
|
2176
2296
|
}
|
|
2177
|
-
}),
|
|
2178
|
-
const t =
|
|
2297
|
+
}), go = (i, e) => {
|
|
2298
|
+
const t = i.__vccOpts || i;
|
|
2179
2299
|
for (const [n, o] of e)
|
|
2180
2300
|
t[n] = o;
|
|
2181
2301
|
return t;
|
|
2182
|
-
},
|
|
2183
|
-
let
|
|
2302
|
+
}, vo = /* @__PURE__ */ go(po, [["__scopeId", "data-v-304aacf0"]]);
|
|
2303
|
+
let rt = class extends Ee {
|
|
2184
2304
|
static name = "Editor";
|
|
2185
2305
|
container = new m.Group();
|
|
2186
2306
|
get renderer() {
|
|
@@ -2204,7 +2324,7 @@ let ot = class extends ye {
|
|
|
2204
2324
|
get domContainer() {
|
|
2205
2325
|
return this.parent?.findComponentByName("DomContainer");
|
|
2206
2326
|
}
|
|
2207
|
-
commandManager = new
|
|
2327
|
+
commandManager = new vn();
|
|
2208
2328
|
plane = new m.Mesh(new m.PlaneGeometry(2e3, 2e3, 2, 2));
|
|
2209
2329
|
app;
|
|
2210
2330
|
domElement = document.createElement("div");
|
|
@@ -2220,7 +2340,7 @@ let ot = class extends ye {
|
|
|
2220
2340
|
this.domContainer.domElement.parentElement && (this.domContainer.domElement.parentElement.appendChild(this.domElement), t());
|
|
2221
2341
|
});
|
|
2222
2342
|
setTimeout(() => {
|
|
2223
|
-
this.app = Ot(
|
|
2343
|
+
this.app = Ot(vo, { dxfSystem: this.parent, permission: this.viewPermission }), this.app.mount(this.domElement);
|
|
2224
2344
|
});
|
|
2225
2345
|
}
|
|
2226
2346
|
/**
|
|
@@ -2238,20 +2358,20 @@ let ot = class extends ye {
|
|
|
2238
2358
|
* 打开编辑器
|
|
2239
2359
|
*/
|
|
2240
2360
|
openEdit() {
|
|
2241
|
-
const e = this.renderer, t = this.domEventRegister, n = this.dxf, o = e.orbitControls,
|
|
2242
|
-
this.container.position.z = n.originalZAverage, e.scene.add(this.container), o && (
|
|
2243
|
-
const
|
|
2244
|
-
e.renderer.getSize(
|
|
2245
|
-
const
|
|
2246
|
-
h.set(
|
|
2247
|
-
const
|
|
2248
|
-
|
|
2361
|
+
const e = this.renderer, t = this.domEventRegister, n = this.dxf, o = e.orbitControls, a = e.camera, s = n.box.center, r = e.camera.position.clone(), l = o?.target?.clone(), d = new m.Vector2(), c = new m.Raycaster(), h = this.coords, y = this.pointerPosition;
|
|
2362
|
+
this.container.position.z = n.originalZAverage, e.scene.add(this.container), o && (a.position.set(s.x, s.y, 15), o.target.set(s.x, s.y, 0), o.enableRotate = !1);
|
|
2363
|
+
const w = () => {
|
|
2364
|
+
e.renderer.getSize(d);
|
|
2365
|
+
const b = t.pointer.x / d.x * 2 - 1, f = -(t.pointer.y / d.y * 2 - 1);
|
|
2366
|
+
h.set(b, f), c.setFromCamera(h, e.camera.children.length ? e.camera.children[0] : e.camera);
|
|
2367
|
+
const M = c.intersectObject(this.plane);
|
|
2368
|
+
M.length && (y.copy(M[0].point), this.dispatchEvent({
|
|
2249
2369
|
type: "pointerPositionChange",
|
|
2250
|
-
position:
|
|
2370
|
+
position: y
|
|
2251
2371
|
}));
|
|
2252
2372
|
};
|
|
2253
|
-
t.addEventListener("mousemove",
|
|
2254
|
-
t.removeEventListener("mousemove",
|
|
2373
|
+
t.addEventListener("mousemove", w), this.commandManager.disabled = !1, this.commandManager.start("default"), this._exitEditCallBack = () => {
|
|
2374
|
+
t.removeEventListener("mousemove", w), o && (a.position.copy(r), o.enableRotate = !0, o.target.copy(l));
|
|
2255
2375
|
};
|
|
2256
2376
|
}
|
|
2257
2377
|
/**
|
|
@@ -2264,7 +2384,7 @@ let ot = class extends ye {
|
|
|
2264
2384
|
super.destroy(), this.exitEdit(), this.renderer.scene.remove(this.container), this.domElement.remove(), this.app?.unmount();
|
|
2265
2385
|
}
|
|
2266
2386
|
};
|
|
2267
|
-
class
|
|
2387
|
+
class fo extends V {
|
|
2268
2388
|
static name = "PointDrag";
|
|
2269
2389
|
container = new m.Group();
|
|
2270
2390
|
interruptKeys = ["escape"];
|
|
@@ -2281,8 +2401,8 @@ class co extends T {
|
|
|
2281
2401
|
selectPoint(e) {
|
|
2282
2402
|
let t = null, n = new m.Mesh(new m.SphereGeometry(0.05), new m.MeshBasicMaterial({ color: 16711935 })), o = null;
|
|
2283
2403
|
this.addEventRecord("selectPointStart").add(this.editor.addEventListener("pointerPositionChange", () => {
|
|
2284
|
-
const { point:
|
|
2285
|
-
this.dispatchEvent({ type: "pointerMove", point:
|
|
2404
|
+
const { point: a, line: s, find: r, mode: l } = this.editor.renderManager.adsorption();
|
|
2405
|
+
this.dispatchEvent({ type: "pointerMove", point: a }), r && l === "point" ? (this.domElement.style.cursor = "none", n.position.copy(a), o = s, t = a.clone(), this.container.add(n)) : (this.domElement.style.cursor = "no-drop", t = null, n.removeFromParent());
|
|
2286
2406
|
})).add(this.eventInput.addEventListener("codeChange", () => {
|
|
2287
2407
|
this.eventInput.isKeyDown("mouse_0") && t && (this.canceEventRecord("selectPointStart"), n.material.color.set(65280), e({ point: t, line: o }));
|
|
2288
2408
|
})), this.addEventRecord("clear").add(() => n.removeFromParent());
|
|
@@ -2294,19 +2414,19 @@ class co extends T {
|
|
|
2294
2414
|
*/
|
|
2295
2415
|
drag(e, { point: t, line: n }) {
|
|
2296
2416
|
this.domElement.style.cursor = "crosshair";
|
|
2297
|
-
const o = n.start.equal(
|
|
2298
|
-
this.container.add(
|
|
2299
|
-
let { point:
|
|
2300
|
-
if (
|
|
2301
|
-
if (this.dispatchEvent({ type: "pointerMove", point:
|
|
2302
|
-
const
|
|
2303
|
-
|
|
2417
|
+
const o = n.start.equal(W.from(t)) ? "start" : "end", a = o == "start" ? new m.Vector3(n.end.x, n.end.y, 0) : new m.Vector3(n.start.x, n.start.y, 0), s = t.clone(), r = new we([a, s], 16711935), l = new m.Mesh(new m.SphereGeometry(0.03), new m.MeshBasicMaterial({ color: 16711935 }));
|
|
2418
|
+
this.container.add(r), this.addEventRecord("clear").add(this.editor.addEventListener("pointerPositionChange", () => {
|
|
2419
|
+
let { point: d, find: c } = this.editor.renderManager.adsorption(), h = "none";
|
|
2420
|
+
if (d) {
|
|
2421
|
+
if (this.dispatchEvent({ type: "pointerMove", point: d }), this.eventInput.isKeyDown("shift")) {
|
|
2422
|
+
const y = n.projectPoint(W.from(d), !1);
|
|
2423
|
+
d.set(y?.x ?? d.x, y?.y ?? d.y, 0), c = !0, h = "crosshair";
|
|
2304
2424
|
}
|
|
2305
|
-
c ? (
|
|
2425
|
+
c ? (l.position.copy(d), this.container.add(l)) : (l.removeFromParent(), h = "crosshair"), s.copy(d), r.setPoint(a, s), this.domElement.style.cursor = h;
|
|
2306
2426
|
}
|
|
2307
2427
|
})).add(this.eventInput.addEventListener("codeChange", () => {
|
|
2308
|
-
this.eventInput.isKeyDown("mouse_0") && (this.canceEventRecord("selectPointStart"), e({ point:
|
|
2309
|
-
})).add(() =>
|
|
2428
|
+
this.eventInput.isKeyDown("mouse_0") && (this.canceEventRecord("selectPointStart"), e({ point: s, oldPoint: o === "end" ? n.end.clone() : n.start.clone(), line: n, mode: o }));
|
|
2429
|
+
})).add(() => l.removeFromParent()).add(() => r.removeFromParent());
|
|
2310
2430
|
}
|
|
2311
2431
|
/** 执行完成
|
|
2312
2432
|
*/
|
|
@@ -2329,15 +2449,43 @@ class co extends T {
|
|
|
2329
2449
|
return this.completed(e), e;
|
|
2330
2450
|
}
|
|
2331
2451
|
}
|
|
2332
|
-
|
|
2333
|
-
|
|
2452
|
+
class re extends V {
|
|
2453
|
+
static name = "VerticalReferenceLine";
|
|
2454
|
+
shortcutKeys = ["v"];
|
|
2455
|
+
static commandName = "VerticalReferenceLine";
|
|
2456
|
+
onAddFromParent(e) {
|
|
2457
|
+
super.onAddFromParent(e);
|
|
2458
|
+
const t = this.commandManager.addCommandFlow(re.commandName).add(this.createInterrupt()).add(this.constraint.bind(this)).add(this.verticalReferenceLine.bind(this));
|
|
2459
|
+
t.writeOperationList = !1, t.addEventListener("finally", this.createFinally()), this.eventInput.addKeyCombination(re.commandName, this.shortcutKeys), this.eventInput.addEventListener("codeChange", async () => {
|
|
2460
|
+
this.eventInput.isKeyCombination(re.commandName) && await this.commandManager.start(re.commandName, [...this.default.selectLines]);
|
|
2461
|
+
}), this.eventInput.addCancelDefaultBehavior(() => this.eventInput.isOnlyKeyDowns(this.shortcutKeys));
|
|
2462
|
+
}
|
|
2463
|
+
/**
|
|
2464
|
+
* 进入命令约束
|
|
2465
|
+
*/
|
|
2466
|
+
constraint(e, t) {
|
|
2467
|
+
Array.isArray(t) ? t.length !== 1 ? (D({ message: "请选择一条线段", type: "warning" }), this.cancel()) : e(t) : (D({ message: "进入命令失败", type: "warning" }), this.cancel());
|
|
2468
|
+
}
|
|
2469
|
+
/**
|
|
2470
|
+
*
|
|
2471
|
+
* @param next
|
|
2472
|
+
* @param selectLines
|
|
2473
|
+
*/
|
|
2474
|
+
verticalReferenceLine(e, t) {
|
|
2475
|
+
this.renderManager.lines.forEach((n) => {
|
|
2476
|
+
delete n.userData.isVerticalReferenceLine;
|
|
2477
|
+
}), t[0].userData.isVerticalReferenceLine = !0, e(), this.renderManager.draw();
|
|
2478
|
+
}
|
|
2479
|
+
}
|
|
2480
|
+
function We(i, e = {}) {
|
|
2481
|
+
i.addComponent(new rt(e.viewPermission)), i.addComponent(new qn()), i.addComponent(new Be()), i.addComponent(new pn()), i.addComponent(new Un()), i.addComponent(new Zn()), i.addComponent(new fo()), i.addComponent(new $()), i.addComponent(new X()), i.addComponent(new de()), i.addComponent(new ee()), i.addComponent(new te()), i.addComponent(new ne()), i.addComponent(new oe()), i.addComponent(new ae()), i.addComponent(new re());
|
|
2334
2482
|
}
|
|
2335
|
-
const
|
|
2336
|
-
create(
|
|
2337
|
-
return (e) =>
|
|
2483
|
+
const Lo = Object.assign(We, {
|
|
2484
|
+
create(i = {}) {
|
|
2485
|
+
return (e) => We(e, i);
|
|
2338
2486
|
}
|
|
2339
2487
|
});
|
|
2340
2488
|
export {
|
|
2341
|
-
|
|
2342
|
-
|
|
2489
|
+
Lo as Editor,
|
|
2490
|
+
We as Editor_
|
|
2343
2491
|
};
|