@xtctwins/tctwins-bimx-engine 0.3.11 → 0.3.13
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/README.md +1 -1
- package/dist/{AnnotationTool-BnLd0s38.mjs → AnnotationTool-k3W4xmw6.mjs} +13 -14
- package/dist/BIMX_Viewer_Lib.es.js +5 -5
- package/dist/BIMX_Viewer_Lib.umd.js +184 -164
- package/dist/{CameraViewTool-BGmwAori.mjs → CameraViewTool-CuXnJa74.mjs} +15 -15
- package/dist/{CommentTool-B9TgO52t.mjs → CommentTool-CUtaZc7Y.mjs} +276 -277
- package/dist/{HiddenTool-CNMJqZzC.mjs → HiddenTool-CzJ19mP1.mjs} +9 -10
- package/dist/{InspectorTool-CiyN_aCB.mjs → InspectorTool-BTH82K8b.mjs} +3 -3
- package/dist/MeasureTool-BvPkIvmX.mjs +593 -0
- package/dist/{MouseTool-B07SstRZ.mjs → MouseTool-CiywjpW3.mjs} +6 -6
- package/dist/{NavigateTool-B8qIl9xy.mjs → NavigateTool-CDlYpMXl.mjs} +13 -14
- package/dist/OperateTool-NMIYz2YN.mjs +185 -0
- package/dist/{RoamTool-3sDI1Ouu.mjs → RoamTool-BkwJBBAg.mjs} +1 -1
- package/dist/{ScreenShotTool-CjsT2-Va.mjs → ScreenShotTool-BP-xDRKf.mjs} +16 -17
- package/dist/SectionTool-mt4iqa1I.mjs +241 -0
- package/dist/SettingTool-DieHq4VO.mjs +1745 -0
- package/dist/{StructureTree-B183vT5b.mjs → StructureTree-C8C435JY.mjs} +5 -6
- package/dist/{alert-DN7oOiZl.mjs → alert-B9Uw8l52.mjs} +18 -13
- package/dist/{index-DfRswjrC.mjs → index-B_IMYBaJ.mjs} +59333 -53195
- package/dist/{panel.vue_vue_type_style_index_0_lang-DOsptET6.mjs → panel.vue_vue_type_style_index_0_lang-BswWCo8x.mjs} +1 -1
- package/dist/style.css +1 -1
- package/dist/{tallPanel-D0Zgkc3n.mjs → tallPanel-CnTIaRU-.mjs} +1 -1
- package/package.json +5 -5
- package/types/components/BimViewerComponents/OperateTool.vue.d.ts +12 -0
- package/types/components/BimViewerComponents/SectionModeBar.vue.d.ts +2 -0
- package/types/components/BimxViewerComp.vue.d.ts +2 -0
- package/types/components/utilsComponents/alert.vue.d.ts +9 -0
- package/types/i18n/index.d.ts +212 -0
- package/types/i18n/locales/en-US.d.ts +53 -0
- package/types/i18n/locales/zh-CN.d.ts +53 -0
- package/types/pages/BimxViewerEntry.vue.d.ts +3 -0
- package/types/store/const.d.ts +12 -0
- package/types/store/toolbars.d.ts +53 -1
- package/types/utils/OSSHelper.d.ts +2 -0
- package/types/utils/eventBus.d.ts +6 -1
- package/types/viewerManager/load/loadModel.d.ts +88 -0
- package/types/viewerManager/sectionManager.d.ts +524 -0
- package/types/viewerManager/viewerManager.d.ts +7 -1
- package/dist/AnnotationTool-Bp8DGFFA.mjs +0 -167
- package/dist/CameraViewTool-BwVnc0ua.mjs +0 -164
- package/dist/CommentTool-C7NLPxMd.mjs +0 -1529
- package/dist/HiddenTool-i1AESn4-.mjs +0 -57
- package/dist/InspectorTool-D4gr7uiQ.mjs +0 -679
- package/dist/MeasureTool-BNBUx-1X.mjs +0 -323
- package/dist/MeasureTool-Cxnp9MVY.mjs +0 -323
- package/dist/MouseTool-DVqNDADf.mjs +0 -84
- package/dist/NavigateTool-DKTSPVCL.mjs +0 -52
- package/dist/RoamTool-CazuxheL.mjs +0 -287
- package/dist/ScreenShotTool-fYVxpPrW.mjs +0 -430
- package/dist/SectionTool-Bpk5jewK.mjs +0 -331
- package/dist/SectionTool-DMSGkjYm.mjs +0 -331
- package/dist/SettingTool-BuSm2JB6.mjs +0 -695
- package/dist/SettingTool-IBRpWdfo.mjs +0 -695
- package/dist/StructureTree-D9z28tm4.mjs +0 -1686
- package/dist/alert-DwTFq4bp.mjs +0 -47
- package/dist/const-DOnRsYpZ.mjs +0 -389
- package/dist/el-slider-C9_q447A.mjs +0 -1059
- package/dist/el-slider-dslleM3g.mjs +0 -1059
- package/dist/index-BzB8rqmg.mjs +0 -131961
- package/dist/panel.vue_vue_type_style_index_0_lang-E8w23EhV.mjs +0 -61
- package/dist/tallPanel-Dp1ZbCTR.mjs +0 -84
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { defineComponent as y, onMounted as E, ref as k, onBeforeUnmount as B, openBlock as s, createElementBlock as l, createElementVNode as r, Fragment as C, renderList as H, unref as c, normalizeClass as w, toDisplayString as I } from "vue";
|
|
2
|
-
import { F as S, G as T, I as m,
|
|
3
|
-
import { H as j } from "./const-DOnRsYpZ.mjs";
|
|
2
|
+
import { F as S, G as T, I as m, X as A, P as O, H as x, M as j } from "./index-B_IMYBaJ.mjs";
|
|
4
3
|
const D = { class: "hidden_wrapper" }, L = { class: "hidden_content" }, M = ["onClick"], F = ["src"], N = /* @__PURE__ */ y({
|
|
5
4
|
__name: "HiddenTool",
|
|
6
5
|
props: ["componentId"],
|
|
@@ -12,7 +11,7 @@ const D = { class: "hidden_wrapper" }, L = { class: "hidden_content" }, M = ["on
|
|
|
12
11
|
});
|
|
13
12
|
const i = k(0), d = () => {
|
|
14
13
|
const { eventTrigger: e } = window.bimViewer;
|
|
15
|
-
|
|
14
|
+
x("isMobile") ? e.on("touchEntity", (n) => {
|
|
16
15
|
!window.bimViewer.disableClickEvent || !o.isToolActiveBykey("hidden") || a(n);
|
|
17
16
|
}) : e.on("pickedEntity", (n) => {
|
|
18
17
|
!window.bimViewer.disableClickEvent || !o.isToolActiveBykey("hidden") || a(n);
|
|
@@ -22,10 +21,10 @@ const D = { class: "hidden_wrapper" }, L = { class: "hidden_content" }, M = ["on
|
|
|
22
21
|
m.off("BimViewer", d);
|
|
23
22
|
});
|
|
24
23
|
const a = (e) => {
|
|
25
|
-
i.value != -1 && (i.value == 1 ?
|
|
26
|
-
}, f = (e) => {
|
|
27
|
-
window.bimViewer.setEntityVisible(e);
|
|
24
|
+
i.value != -1 && (i.value == 1 ? v(e) : i.value == 2 ? f(e) : i.value == 3 && h(e));
|
|
28
25
|
}, v = (e) => {
|
|
26
|
+
window.bimViewer.setEntityVisible(e);
|
|
27
|
+
}, f = (e) => {
|
|
29
28
|
window.bimViewer.setEntityHighlighted(e);
|
|
30
29
|
}, h = (e) => {
|
|
31
30
|
window.bimViewer.setEntitySelected(e);
|
|
@@ -36,13 +35,13 @@ const D = { class: "hidden_wrapper" }, L = { class: "hidden_content" }, M = ["on
|
|
|
36
35
|
};
|
|
37
36
|
return (e, n) => (s(), l("div", D, [
|
|
38
37
|
r("div", L, [
|
|
39
|
-
(s(!0), l(C, null, H(c(
|
|
38
|
+
(s(!0), l(C, null, H(c(A), (t, V) => (s(), l("div", {
|
|
40
39
|
key: V,
|
|
41
40
|
class: w(["button_", { button_active: i.value == t.id }]),
|
|
42
41
|
onClick: (R) => g(t.id)
|
|
43
42
|
}, [
|
|
44
43
|
r("img", {
|
|
45
|
-
src: c(
|
|
44
|
+
src: c(O) + `/bim-viewer/hidden-bar/new-icon/bimkk-mobile-hidden-${i.value == t.id ? t.img_active : t.img}.svg`
|
|
46
45
|
}, null, 8, F),
|
|
47
46
|
r("span", {
|
|
48
47
|
class: w({ active_text: i.value == t.id })
|
|
@@ -51,7 +50,7 @@ const D = { class: "hidden_wrapper" }, L = { class: "hidden_content" }, M = ["on
|
|
|
51
50
|
])
|
|
52
51
|
]));
|
|
53
52
|
}
|
|
54
|
-
}),
|
|
53
|
+
}), z = /* @__PURE__ */ j(N, [["__scopeId", "data-v-a3ff9c01"]]);
|
|
55
54
|
export {
|
|
56
|
-
|
|
55
|
+
z as default
|
|
57
56
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { O as ee, F as te, G as ne, I as D, H as v, T as N, K as oe, P as H, L as se, M as ie } from "./index-
|
|
2
|
-
import { _ as ae } from "./tallPanel-
|
|
3
|
-
import { _ as le } from "./panel.vue_vue_type_style_index_0_lang-
|
|
1
|
+
import { O as ee, F as te, G as ne, I as D, H as v, T as N, K as oe, P as H, L as se, M as ie } from "./index-B_IMYBaJ.mjs";
|
|
2
|
+
import { _ as ae } from "./tallPanel-CnTIaRU-.mjs";
|
|
3
|
+
import { _ as le } from "./panel.vue_vue_type_style_index_0_lang-BswWCo8x.mjs";
|
|
4
4
|
import { defineComponent as ce, onMounted as re, ref as W, reactive as G, watch as _e, onBeforeUnmount as pe, openBlock as c, createElementBlock as r, Fragment as y, unref as n, createBlock as Q, withCtx as I, withDirectives as d, createElementVNode as e, createVNode as B, toDisplayString as t, vShow as m, renderList as f, createCommentVNode as O } from "vue";
|
|
5
5
|
const Z = {
|
|
6
6
|
ExtendToStructure: "扩建物",
|
|
@@ -0,0 +1,593 @@
|
|
|
1
|
+
import { _ as pt } from "./alert-B9Uw8l52.mjs";
|
|
2
|
+
import { F as bt, G as ft, T as Ye, Y as W, I as Fe, H as h, W as yt, P as E, J as ht, Z as gt, $ as Mt, L as kt, a0 as j, M as wt } from "./index-B_IMYBaJ.mjs";
|
|
3
|
+
import { _ as Tt } from "./panel.vue_vue_type_style_index_0_lang-BswWCo8x.mjs";
|
|
4
|
+
import { defineComponent as xt, ref as u, onMounted as Xe, computed as pe, onBeforeUnmount as Dt, watch as At, nextTick as St, openBlock as r, createElementBlock as d, Fragment as x, unref as a, createBlock as Ne, withCtx as O, createElementVNode as l, renderList as C, normalizeClass as q, toDisplayString as m, normalizeStyle as be, createCommentVNode as se, createVNode as p, withDirectives as We, vShow as je } from "vue";
|
|
5
|
+
const Pt = {
|
|
6
|
+
key: 0,
|
|
7
|
+
class: "measure_panel_content"
|
|
8
|
+
}, Vt = { class: "measurement_type" }, Bt = ["onClick"], Et = ["src"], Ct = {
|
|
9
|
+
key: 1,
|
|
10
|
+
class: "measurement_img_empty"
|
|
11
|
+
}, Lt = { class: "measurement_data" }, It = {
|
|
12
|
+
key: 0,
|
|
13
|
+
class: "datum_bar"
|
|
14
|
+
}, Rt = { class: "footer" }, $t = {
|
|
15
|
+
key: 1,
|
|
16
|
+
class: "setMeasurePanel"
|
|
17
|
+
}, Ht = { class: "set_content_par" }, Ot = { class: "set_content_" }, Ut = {
|
|
18
|
+
class: "set_content scale",
|
|
19
|
+
style: { display: "none" }
|
|
20
|
+
}, zt = { class: "set_content unit" }, Yt = { class: "set_content precision" }, Ft = { class: "footer" }, Xt = {
|
|
21
|
+
key: 1,
|
|
22
|
+
class: "mobile_measure_panel"
|
|
23
|
+
}, Nt = { class: "mobile_panel_bar" }, Wt = ["src"], jt = { class: "mouse_btn" }, qt = ["src"], Jt = { class: "measure-list" }, Zt = ["onClick"], Kt = { class: "measure-icon" }, Qt = ["src"], Gt = { class: "measure-name" }, el = { class: "measure-icon" }, tl = ["src"], ll = {
|
|
24
|
+
class: "measure-name",
|
|
25
|
+
style: { color: "#df1c1c" }
|
|
26
|
+
}, sl = {
|
|
27
|
+
key: 2,
|
|
28
|
+
class: "mobile_set_dialog"
|
|
29
|
+
}, al = { class: "mobile_set_close_btn" }, ol = { class: "mobile_set_title" }, nl = { class: "mobile_set_row" }, il = { class: "mobile_set_row" }, ul = {
|
|
30
|
+
key: 0,
|
|
31
|
+
class: "mobile_set_datum"
|
|
32
|
+
}, cl = { class: "mobile_set_actions" }, rl = ["src"], dl = ["src"], qe = 5, Je = 6, ml = /* @__PURE__ */ xt({
|
|
33
|
+
__name: "MeasureTool",
|
|
34
|
+
props: ["componentId"],
|
|
35
|
+
emits: ["closePanel", "emitHandler"],
|
|
36
|
+
setup(Ze, { emit: Ke }) {
|
|
37
|
+
const n = bt(), L = ft(), Qe = Ze, ae = u(0);
|
|
38
|
+
Xe(() => {
|
|
39
|
+
L.setReadyById(Qe.componentId), Ye.currentTheme == "blue" ? ae.value = 224 : Ye.currentTheme == "light-gray" && (ae.value = 202);
|
|
40
|
+
});
|
|
41
|
+
let o, U, z, _;
|
|
42
|
+
const b = u(1), D = u(""), fe = u(), oe = u(), ye = u(), ne = u(), he = u(), ie = u(), ue = u(), ce = u(), re = u(""), de = u(""), J = u(1), I = u("m"), A = u(3), M = u(!1), ge = [{ value: "m" }, { value: "cm" }, { value: "mm" }], f = u(!1), Me = [
|
|
43
|
+
{ label: "0", value: 0 },
|
|
44
|
+
{ label: "0.0", value: 1 },
|
|
45
|
+
{ label: "0.00", value: 2 },
|
|
46
|
+
{ label: "0.000", value: 3 }
|
|
47
|
+
], Ge = {
|
|
48
|
+
pointDistance: [
|
|
49
|
+
{ label: "measure.distanceLabel", key: "text", color: "#0065fc" },
|
|
50
|
+
{ label: "measure.x", key: "dx", color: "#fe4444" },
|
|
51
|
+
{ label: "measure.y", key: "dy", color: "#4ed17a" },
|
|
52
|
+
{ label: "measure.z", key: "dz", color: "#ffce19" }
|
|
53
|
+
],
|
|
54
|
+
pointAngle: [
|
|
55
|
+
{ label: "measure.angleLabel", key: "text", color: "#0065fc" },
|
|
56
|
+
{ label: "measure.typeLabel", key: "type", color: "#7a8ba6" }
|
|
57
|
+
],
|
|
58
|
+
edgeLength: [
|
|
59
|
+
{ label: "measure.lengthLabel", key: "text", color: "#0065fc" },
|
|
60
|
+
{ label: "measure.typeLabel", key: "type", color: "#7a8ba6" }
|
|
61
|
+
],
|
|
62
|
+
edgeDistance: [
|
|
63
|
+
{ label: "measure.distanceLabel", key: "text", color: "#0065fc" },
|
|
64
|
+
{ label: "measure.typeLabel", key: "type", color: "#7a8ba6" }
|
|
65
|
+
],
|
|
66
|
+
edgeAngle: [
|
|
67
|
+
{ label: "measure.angleLabel", key: "text", color: "#0065fc" },
|
|
68
|
+
{ label: "measure.typeLabel", key: "type", color: "#7a8ba6" }
|
|
69
|
+
],
|
|
70
|
+
circleRadius: [
|
|
71
|
+
{ label: "measure.radiusLabel", key: "text", color: "#0065fc" },
|
|
72
|
+
{ label: "measure.typeLabel", key: "type", color: "#7a8ba6" }
|
|
73
|
+
],
|
|
74
|
+
elevation: [
|
|
75
|
+
{ label: "measure.elevationLabel", key: "text", color: "#0065fc" },
|
|
76
|
+
{ label: "measure.typeLabel", key: "type", color: "#7a8ba6" }
|
|
77
|
+
]
|
|
78
|
+
}, k = pe(() => {
|
|
79
|
+
var e;
|
|
80
|
+
return ((e = W.find((t) => t.id === b.value)) == null ? void 0 : e.code) || "pointDistance";
|
|
81
|
+
}), R = u(!0), g = u("");
|
|
82
|
+
let $ = null;
|
|
83
|
+
const Z = (e) => {
|
|
84
|
+
g.value = e || "", R.value = !0, $ && clearTimeout($), $ = setTimeout(() => {
|
|
85
|
+
$ = null, g.value = "";
|
|
86
|
+
}, 4e3);
|
|
87
|
+
}, w = u(!1), et = pe(
|
|
88
|
+
() => g.value || (w.value ? n("measure.hint_setDatumPick") : n(`measure.hint_${k.value}`))
|
|
89
|
+
), tt = () => {
|
|
90
|
+
R.value = !1;
|
|
91
|
+
}, lt = pe(
|
|
92
|
+
() => (Ge[k.value] || []).map((e) => {
|
|
93
|
+
let t = "";
|
|
94
|
+
e.key === "text" ? t = re.value || "~" : e.key === "type" ? t = de.value || "-" : e.key === "dx" ? t = ie.value ?? "" : e.key === "dy" ? t = ue.value ?? "" : e.key === "dz" && (t = ce.value ?? "");
|
|
95
|
+
const i = o && o.getModeColor ? o.getModeColor(k.value) : "", c = e.key === "text" && i ? i : e.color;
|
|
96
|
+
return { label: e.label, key: `${e.key}_${e.label}`, color: c, value: t };
|
|
97
|
+
})
|
|
98
|
+
), ke = Ke, we = (e) => {
|
|
99
|
+
ke("emitHandler", e);
|
|
100
|
+
}, Te = () => {
|
|
101
|
+
o = window.bimViewer.measureProTool, z = window.bimViewer.measureAngleTool, U = window.bimViewer.measureDistanceTool, _ = window.bimViewer.eventTrigger;
|
|
102
|
+
const e = W.find((t) => t.code === j.NormalizeMeasureMode(j.viewerState.measureType));
|
|
103
|
+
e && (b.value = e.id), j.SaveViewerState({ measure: k.value }), _.on("newDistanceMeasure", () => {
|
|
104
|
+
g.value = "", V(), h("isMobile") && (f.value = !1);
|
|
105
|
+
}), _.on("newAngleMeasure", () => {
|
|
106
|
+
g.value = "", V(), h("isMobile") && (f.value = !1);
|
|
107
|
+
}), _.on("proMeasureRejected", (t) => {
|
|
108
|
+
Z(t && t.reasonText ? t.reasonText : "");
|
|
109
|
+
}), _.on("proMeasureDatumPicked", () => {
|
|
110
|
+
w.value = !1;
|
|
111
|
+
const t = D.value;
|
|
112
|
+
t && B(t), Z(n("measure.setDatumDone"));
|
|
113
|
+
}), _.on("proMeasureDatumPickCancel", () => {
|
|
114
|
+
w.value = !1;
|
|
115
|
+
}), _.on("createAngleMeasure", (t) => {
|
|
116
|
+
he.value = t.id, ne.value = t.result, B(t.id), h("isMobile") && (f.value = !0), S("createAngleMeasure", { newMeasure: t });
|
|
117
|
+
}), _.on("createDistanceMeasure", (t) => {
|
|
118
|
+
fe.value = t.id, ye.value = t.id, oe.value = t.result, ie.value = t.xResult ? t.xResult : 0, ue.value = t.yResult ? t.yResult : 0, ce.value = t.zResult ? t.zResult : 0, B(t.id), h("isMobile") && (f.value = !0), S("createAngleMeasure", { newMeasure: t });
|
|
119
|
+
}), _.on("clickDistanceMeasure", (t) => {
|
|
120
|
+
fe.value = t.id, ye.value = t.id, Pe(t.id), o.getModeByMeasurementId(t.id) || (oe.value = U.getMeasureResultByID(t.id)), B(t.id), h("isMobile") && (f.value = !0), S("clickDistanceMeasure", { id: t.id });
|
|
121
|
+
}), _.on("clickAngleMeasure", (t) => {
|
|
122
|
+
he.value = t.id, Pe(t.id), o.getModeByMeasurementId(t.id) || (ne.value = z.getMeasureResultByID(t.id)), B(t.id), h("isMobile") && (f.value = !0), S("clickAngleMeasure", { id: t.id });
|
|
123
|
+
}), _.on("DistanceMeasureDestroyed", (t) => Ve(t.id)), _.on("AngleMeasureDestroyed", (t) => Ve(t.id)), Be(), Ee() && L.isToolActive(3) && ve(!0);
|
|
124
|
+
};
|
|
125
|
+
Fe.on("BimViewer", Te), Dt(() => {
|
|
126
|
+
$ && clearTimeout($), me(), Fe.off("BimViewer", Te);
|
|
127
|
+
}), At(
|
|
128
|
+
() => L.isToolActive(3),
|
|
129
|
+
(e) => {
|
|
130
|
+
ut(e), e && (R.value = !0), Ee() && ve(!!e);
|
|
131
|
+
}
|
|
132
|
+
);
|
|
133
|
+
const S = (e, t) => {
|
|
134
|
+
we({
|
|
135
|
+
isTool: !0,
|
|
136
|
+
event_name: e,
|
|
137
|
+
event_target: "MeasureTool",
|
|
138
|
+
content: t
|
|
139
|
+
});
|
|
140
|
+
}, st = () => {
|
|
141
|
+
K(), window.bimViewer.SetMeasureProAllDisactive(), ke("closePanel"), M.value === !0 && P();
|
|
142
|
+
}, xe = (e) => {
|
|
143
|
+
if (b.value === e.id)
|
|
144
|
+
return;
|
|
145
|
+
b.value = e.id, j.SaveViewerState({ measure: e.code }), g.value = "", K(), nt(), De(e), R.value = !0;
|
|
146
|
+
const t = o && o.getMeasurementsSummaryByMode ? o.getMeasurementsSummaryByMode(e.code) : [];
|
|
147
|
+
t.length ? B(t[t.length - 1].id) : V(), h("isMobile") && (f.value = !1);
|
|
148
|
+
}, De = (e) => {
|
|
149
|
+
const t = e.code;
|
|
150
|
+
window.bimViewer.SetMeasureProActive(e.code, !0), we({
|
|
151
|
+
isTool: !0,
|
|
152
|
+
event_name: "",
|
|
153
|
+
event_target: "MeasureTool",
|
|
154
|
+
content: {
|
|
155
|
+
measureTool: t
|
|
156
|
+
}
|
|
157
|
+
});
|
|
158
|
+
}, Ae = () => {
|
|
159
|
+
if (w.value) {
|
|
160
|
+
K();
|
|
161
|
+
return;
|
|
162
|
+
}
|
|
163
|
+
if (!o || !o.beginMeasureDatumPick) {
|
|
164
|
+
Z(n("measure.setDatumHint"));
|
|
165
|
+
return;
|
|
166
|
+
}
|
|
167
|
+
if (window.bimViewer.SetMeasureProActive("elevation", !0), g.value = "", !o.beginMeasureDatumPick()) {
|
|
168
|
+
Z(n("measure.setDatumHint"));
|
|
169
|
+
return;
|
|
170
|
+
}
|
|
171
|
+
w.value = !0, R.value = !0, M.value = !1;
|
|
172
|
+
}, K = () => {
|
|
173
|
+
w.value = !1, o && o.cancelMeasureDatumPick && o.cancelMeasureDatumPick();
|
|
174
|
+
}, at = () => {
|
|
175
|
+
V(), o && o.clearAll(), U.clear(), z.clear(), S("destroyAllMeasure", { msg: "删除全部测量" }), f.value = !1;
|
|
176
|
+
}, ot = () => {
|
|
177
|
+
const e = D.value;
|
|
178
|
+
if (!e) return;
|
|
179
|
+
const t = k.value === "pointAngle" || k.value === "edgeAngle";
|
|
180
|
+
it(e), S(t ? "destroyMeasurementAngle" : "destroyMeasureDistance", { id: e }), V(), f.value = !1;
|
|
181
|
+
}, P = () => {
|
|
182
|
+
M.value = !M.value;
|
|
183
|
+
}, Se = () => {
|
|
184
|
+
P(), Be(), D.value && B(D.value), S("updateMeasureSet", {
|
|
185
|
+
measurePrefer: {
|
|
186
|
+
distance_precision: A.value,
|
|
187
|
+
distance_unit: I.value,
|
|
188
|
+
distance_scale: J.value
|
|
189
|
+
}
|
|
190
|
+
});
|
|
191
|
+
}, V = () => {
|
|
192
|
+
re.value = "", de.value = "", oe.value = "", ne.value = "", ie.value = "", ue.value = "", ce.value = "", D.value = "";
|
|
193
|
+
}, B = (e) => {
|
|
194
|
+
if (!e || !o || !o.getMeasurementSummary) return;
|
|
195
|
+
D.value = e;
|
|
196
|
+
const t = o.getModeByMeasurementId(e);
|
|
197
|
+
if (t) {
|
|
198
|
+
const c = W.find((v) => v.code === t);
|
|
199
|
+
if (!c) {
|
|
200
|
+
V();
|
|
201
|
+
return;
|
|
202
|
+
}
|
|
203
|
+
c.id !== b.value && (b.value = c.id, j.SaveViewerState({ measure: c.code })), o.getActiveByMode(t) || De(c);
|
|
204
|
+
}
|
|
205
|
+
const i = o.getMeasurementSummary(e);
|
|
206
|
+
i && (re.value = i.text || (i.value ? i.value.toFixed(A.value) : ""), de.value = i.description || i.relationLabel || "");
|
|
207
|
+
}, Pe = (e) => {
|
|
208
|
+
!e || !o || !o.selectMeasurementById || o.selectMeasurementById(e);
|
|
209
|
+
}, nt = () => {
|
|
210
|
+
!o || !o.clearSelectedMeasurement || o.clearSelectedMeasurement();
|
|
211
|
+
}, Ve = (e) => {
|
|
212
|
+
!e || e !== D.value || V();
|
|
213
|
+
}, it = (e) => {
|
|
214
|
+
if (e) {
|
|
215
|
+
if (o && o.getModeByMeasurementId(e)) {
|
|
216
|
+
o.destroyMeasurementById(e);
|
|
217
|
+
return;
|
|
218
|
+
}
|
|
219
|
+
U.destroyMeasurementById(e), z.destroyMeasurementById(e);
|
|
220
|
+
}
|
|
221
|
+
}, Be = () => {
|
|
222
|
+
o && (o.unit = I.value, o.scale = J.value, o.precision = A.value);
|
|
223
|
+
}, ut = (e) => {
|
|
224
|
+
o && o.setAllVisible(e), U.setAllVisible(e), z.setAllVisible(e);
|
|
225
|
+
};
|
|
226
|
+
Xe(() => {
|
|
227
|
+
document.getElementById("top_bar");
|
|
228
|
+
});
|
|
229
|
+
const H = u(!1);
|
|
230
|
+
let Y = !1, Q = 0, G = 0;
|
|
231
|
+
const ee = u(290), te = u(300), Ee = () => !!h("isMobile"), F = () => document.getElementById("measure_mouseGroup"), Ce = () => {
|
|
232
|
+
var e, t, i, c;
|
|
233
|
+
return ((c = (i = (t = (e = window.bimViewer) == null ? void 0 : e.viewer) == null ? void 0 : t.scene) == null ? void 0 : i.canvas) == null ? void 0 : c.canvas) || null;
|
|
234
|
+
}, Le = () => {
|
|
235
|
+
const e = F();
|
|
236
|
+
if (!e)
|
|
237
|
+
return [ee.value + qe, te.value + Je];
|
|
238
|
+
const t = e.getBoundingClientRect();
|
|
239
|
+
return [t.left + qe, t.top + Je];
|
|
240
|
+
}, X = (e, t) => {
|
|
241
|
+
const i = Ce();
|
|
242
|
+
if (!i)
|
|
243
|
+
return;
|
|
244
|
+
const [c, v] = Le(), y = {
|
|
245
|
+
bubbles: !0,
|
|
246
|
+
cancelable: !0,
|
|
247
|
+
composed: !0,
|
|
248
|
+
clientX: c,
|
|
249
|
+
clientY: v,
|
|
250
|
+
screenX: c,
|
|
251
|
+
screenY: v,
|
|
252
|
+
button: 0,
|
|
253
|
+
buttons: t,
|
|
254
|
+
pointerId: 1,
|
|
255
|
+
pointerType: "touch",
|
|
256
|
+
isPrimary: !0
|
|
257
|
+
};
|
|
258
|
+
let T;
|
|
259
|
+
try {
|
|
260
|
+
T = new PointerEvent(e, y);
|
|
261
|
+
} catch {
|
|
262
|
+
T = new MouseEvent(e, y);
|
|
263
|
+
}
|
|
264
|
+
i.dispatchEvent(T);
|
|
265
|
+
}, Ie = () => {
|
|
266
|
+
X("pointermove", 0);
|
|
267
|
+
}, ct = () => {
|
|
268
|
+
const e = F(), [t, i] = Le(), c = e ? e.style.visibility : "";
|
|
269
|
+
e && (e.style.visibility = "hidden");
|
|
270
|
+
const v = document.elementFromPoint ? document.elementFromPoint(t, i) : null;
|
|
271
|
+
return e && (e.style.visibility = c), v;
|
|
272
|
+
}, Re = () => {
|
|
273
|
+
const e = ct(), t = e && e.closest ? e.closest(".tctwins-pro-pill") : null;
|
|
274
|
+
if (t) {
|
|
275
|
+
t.dispatchEvent(new MouseEvent("click", { bubbles: !0, cancelable: !0, view: window }));
|
|
276
|
+
return;
|
|
277
|
+
}
|
|
278
|
+
const i = Ce();
|
|
279
|
+
if (e && e !== i && !(i && i.contains(e)))
|
|
280
|
+
return;
|
|
281
|
+
X("pointermove", 0);
|
|
282
|
+
const c = () => {
|
|
283
|
+
X("pointerdown", 1), X("pointerup", 0);
|
|
284
|
+
};
|
|
285
|
+
typeof requestAnimationFrame == "function" ? requestAnimationFrame(c) : c();
|
|
286
|
+
}, rt = () => {
|
|
287
|
+
X("contextmenu", 0), g.value = "";
|
|
288
|
+
}, dt = () => {
|
|
289
|
+
const e = !H.value;
|
|
290
|
+
e || (K(), rt()), ve(e);
|
|
291
|
+
}, mt = () => {
|
|
292
|
+
const e = F();
|
|
293
|
+
if (!e)
|
|
294
|
+
return;
|
|
295
|
+
const i = (e.offsetParent || document.body).getBoundingClientRect(), c = e.getBoundingClientRect(), v = i.width || window.innerWidth, y = i.height || window.innerHeight, T = c.width || 40, N = c.height || 84, _e = v * 0.62 - T / 2, le = y * 0.5 - N / 2;
|
|
296
|
+
ee.value = Math.max(0, Math.min(_e, v - T)), te.value = Math.max(0, Math.min(le, y - N));
|
|
297
|
+
}, $e = (e) => {
|
|
298
|
+
e.touches.length == 1 && (Y = !0, Q = e.touches[0].clientX, G = e.touches[0].clientY);
|
|
299
|
+
}, He = (e) => {
|
|
300
|
+
if (!Y || e.touches.length != 1)
|
|
301
|
+
return;
|
|
302
|
+
const t = e.touches[0].clientX, i = e.touches[0].clientY;
|
|
303
|
+
ee.value += t - Q, te.value += i - G, Q = t, G = i, Ie();
|
|
304
|
+
}, Oe = () => {
|
|
305
|
+
Y = !1;
|
|
306
|
+
}, vt = () => {
|
|
307
|
+
const e = F();
|
|
308
|
+
e && (me(), e.addEventListener("touchstart", $e), e.addEventListener("touchmove", He), e.addEventListener("touchend", Oe), e.addEventListener("click", Re), Y = !1, Q = 0, G = 0);
|
|
309
|
+
}, me = () => {
|
|
310
|
+
const e = F();
|
|
311
|
+
e == null || e.removeEventListener("touchstart", $e), e == null || e.removeEventListener("touchmove", He), e == null || e.removeEventListener("touchend", Oe), e == null || e.removeEventListener("click", Re);
|
|
312
|
+
}, ve = (e) => {
|
|
313
|
+
if (H.value !== e) {
|
|
314
|
+
if (H.value = e, !e) {
|
|
315
|
+
me(), Y = !1, g.value = "";
|
|
316
|
+
return;
|
|
317
|
+
}
|
|
318
|
+
St(() => {
|
|
319
|
+
mt(), vt(), Ie();
|
|
320
|
+
});
|
|
321
|
+
}
|
|
322
|
+
};
|
|
323
|
+
return (e, t) => {
|
|
324
|
+
var le, Ue, ze;
|
|
325
|
+
const i = yt, c = ht, v = Mt, y = gt, T = Tt, N = kt, _e = pt;
|
|
326
|
+
return r(), d(x, null, [
|
|
327
|
+
a(h)("isMobile") ? (r(), d("div", Xt, [
|
|
328
|
+
l("div", Nt, [
|
|
329
|
+
l("div", {
|
|
330
|
+
class: q(["mobile_set_btn", { mobile_set_btn_active: M.value }]),
|
|
331
|
+
onClick: P
|
|
332
|
+
}, [
|
|
333
|
+
l("img", {
|
|
334
|
+
src: `${a(E)}/industry-viewer/action-bar/${(le = a(L).getToolById(11)) == null ? void 0 : le.img}.svg`,
|
|
335
|
+
alt: ""
|
|
336
|
+
}, null, 8, Wt)
|
|
337
|
+
], 2),
|
|
338
|
+
l("div", jt, [
|
|
339
|
+
l("div", {
|
|
340
|
+
class: "mouse",
|
|
341
|
+
onClick: dt
|
|
342
|
+
}, [
|
|
343
|
+
l("img", {
|
|
344
|
+
src: `${a(E)}/industry-viewer/action-bar/${H.value ? (Ue = a(L).getToolById(16)) == null ? void 0 : Ue.imgActive : (ze = a(L).getToolById(16)) == null ? void 0 : ze.img}.svg`
|
|
345
|
+
}, null, 8, qt),
|
|
346
|
+
l("span", {
|
|
347
|
+
style: be({ color: H.value ? "#1457F7" : "#262626" })
|
|
348
|
+
}, m(a(n)("toolbar.virtualMouse")), 5)
|
|
349
|
+
])
|
|
350
|
+
])
|
|
351
|
+
]),
|
|
352
|
+
l("div", Jt, [
|
|
353
|
+
(r(!0), d(x, null, C(a(W), (s) => (r(), d("div", {
|
|
354
|
+
key: s.id,
|
|
355
|
+
class: q(["measure-item", {
|
|
356
|
+
"measure-item-active": b.value === s.id
|
|
357
|
+
}]),
|
|
358
|
+
onClick: (_t) => xe(s)
|
|
359
|
+
}, [
|
|
360
|
+
l("div", Kt, [
|
|
361
|
+
l("img", {
|
|
362
|
+
src: a(E) + `/bim-viewer/measure-bar/bimkk-mobile-measure-${b.value === s.id ? s.svgActive : s.svg}.svg`,
|
|
363
|
+
alt: ""
|
|
364
|
+
}, null, 8, Qt),
|
|
365
|
+
l("div", Gt, m(a(n)(s.label || s.name)), 1)
|
|
366
|
+
])
|
|
367
|
+
], 10, Zt))), 128)),
|
|
368
|
+
f.value ? (r(), d("div", {
|
|
369
|
+
key: 0,
|
|
370
|
+
class: "measure-item",
|
|
371
|
+
onClick: ot
|
|
372
|
+
}, [
|
|
373
|
+
l("div", el, [
|
|
374
|
+
l("img", {
|
|
375
|
+
src: a(E) + "/bim-viewer/delete.svg",
|
|
376
|
+
alt: ""
|
|
377
|
+
}, null, 8, tl),
|
|
378
|
+
l("div", ll, m(a(n)("common.delete")), 1)
|
|
379
|
+
])
|
|
380
|
+
])) : se("", !0)
|
|
381
|
+
])
|
|
382
|
+
])) : (r(), Ne(T, {
|
|
383
|
+
key: 0,
|
|
384
|
+
class: "measure_panel",
|
|
385
|
+
width: ae.value,
|
|
386
|
+
panelTitle: M.value ? a(n)("measure.settings") : a(n)("measure.title"),
|
|
387
|
+
"click-handle": st
|
|
388
|
+
}, {
|
|
389
|
+
default: O(() => [
|
|
390
|
+
M.value ? (r(), d("div", $t, [
|
|
391
|
+
l("div", Ht, [
|
|
392
|
+
l("div", Ot, [
|
|
393
|
+
l("div", Ut, [
|
|
394
|
+
l("span", null, m(a(n)("measure.scaleLabel")), 1),
|
|
395
|
+
t[5] || (t[5] = l("span", null, "1:", -1)),
|
|
396
|
+
p(c, {
|
|
397
|
+
modelValue: J.value,
|
|
398
|
+
"onUpdate:modelValue": t[0] || (t[0] = (s) => J.value = s),
|
|
399
|
+
style: { width: "122px", height: "28px" },
|
|
400
|
+
placeholder: "1"
|
|
401
|
+
}, null, 8, ["modelValue"])
|
|
402
|
+
]),
|
|
403
|
+
l("div", zt, [
|
|
404
|
+
l("span", null, m(a(n)("measure.unitLabel")), 1),
|
|
405
|
+
p(y, {
|
|
406
|
+
modelValue: I.value,
|
|
407
|
+
"onUpdate:modelValue": t[1] || (t[1] = (s) => I.value = s),
|
|
408
|
+
placeholder: a(n)("measure.unitPlaceholder"),
|
|
409
|
+
style: { width: "136px", height: "28px" }
|
|
410
|
+
}, {
|
|
411
|
+
default: O(() => [
|
|
412
|
+
(r(), d(x, null, C(ge, (s) => p(v, {
|
|
413
|
+
key: s.value,
|
|
414
|
+
value: s.value
|
|
415
|
+
}, null, 8, ["value"])), 64))
|
|
416
|
+
]),
|
|
417
|
+
_: 1
|
|
418
|
+
}, 8, ["modelValue", "placeholder"])
|
|
419
|
+
]),
|
|
420
|
+
l("div", Yt, [
|
|
421
|
+
l("span", null, m(a(n)("measure.precisionLabel")), 1),
|
|
422
|
+
p(y, {
|
|
423
|
+
modelValue: A.value,
|
|
424
|
+
"onUpdate:modelValue": t[2] || (t[2] = (s) => A.value = s),
|
|
425
|
+
placeholder: a(n)("measure.precisionPlaceholder"),
|
|
426
|
+
style: { width: "136px", height: "28px" }
|
|
427
|
+
}, {
|
|
428
|
+
default: O(() => [
|
|
429
|
+
(r(), d(x, null, C(Me, (s) => p(v, {
|
|
430
|
+
key: s.value,
|
|
431
|
+
label: s.label,
|
|
432
|
+
value: s.value
|
|
433
|
+
}, null, 8, ["label", "value"])), 64))
|
|
434
|
+
]),
|
|
435
|
+
_: 1
|
|
436
|
+
}, 8, ["modelValue", "placeholder"])
|
|
437
|
+
])
|
|
438
|
+
])
|
|
439
|
+
]),
|
|
440
|
+
l("div", Ft, [
|
|
441
|
+
l("div", {
|
|
442
|
+
class: "measure_footer_button measure_footer_button_cancel",
|
|
443
|
+
onClick: P
|
|
444
|
+
}, m(a(n)("common.cancel")), 1),
|
|
445
|
+
l("div", {
|
|
446
|
+
class: "measure_footer_button measure_footer_button_save",
|
|
447
|
+
onClick: Se
|
|
448
|
+
}, m(a(n)("common.save")), 1)
|
|
449
|
+
])
|
|
450
|
+
])) : (r(), d("div", Pt, [
|
|
451
|
+
l("div", Vt, [
|
|
452
|
+
(r(!0), d(x, null, C(a(W), (s) => (r(), Ne(i, {
|
|
453
|
+
key: s.id,
|
|
454
|
+
content: a(n)(s.label),
|
|
455
|
+
placement: "top",
|
|
456
|
+
effect: "light",
|
|
457
|
+
"hide-after": 50
|
|
458
|
+
}, {
|
|
459
|
+
default: O(() => [
|
|
460
|
+
l("div", {
|
|
461
|
+
class: q(["measurement_box", { measurement_box_active: b.value === s.id }]),
|
|
462
|
+
onClick: (_t) => xe(s)
|
|
463
|
+
}, [
|
|
464
|
+
s.img || s.imgActive ? (r(), d("img", {
|
|
465
|
+
key: 0,
|
|
466
|
+
class: "measurement_img",
|
|
467
|
+
src: a(E) + `/bim-viewer/action-bars/pmeasure-${b.value === s.id ? s.imgActive : s.img}.svg`,
|
|
468
|
+
alt: ""
|
|
469
|
+
}, null, 8, Et)) : (r(), d("span", Ct))
|
|
470
|
+
], 10, Bt)
|
|
471
|
+
]),
|
|
472
|
+
_: 2
|
|
473
|
+
}, 1032, ["content"]))), 128))
|
|
474
|
+
]),
|
|
475
|
+
l("div", Lt, [
|
|
476
|
+
(r(!0), d(x, null, C(lt.value, (s) => (r(), d("div", {
|
|
477
|
+
key: s.key,
|
|
478
|
+
class: "data_box"
|
|
479
|
+
}, [
|
|
480
|
+
l("div", null, m(a(n)(s.label)), 1),
|
|
481
|
+
l("div", {
|
|
482
|
+
style: be({ color: s.color })
|
|
483
|
+
}, m(s.value), 5)
|
|
484
|
+
]))), 128))
|
|
485
|
+
]),
|
|
486
|
+
k.value === "elevation" ? (r(), d("div", It, [
|
|
487
|
+
l("div", {
|
|
488
|
+
class: q(["datum_button", { datum_button_active: w.value }]),
|
|
489
|
+
onClick: Ae
|
|
490
|
+
}, m(a(n)("measure.setDatum")), 3)
|
|
491
|
+
])) : se("", !0),
|
|
492
|
+
l("div", Rt, [
|
|
493
|
+
l("span", { onClick: at }, m(a(n)("measure.clearAll")), 1),
|
|
494
|
+
l("span", { onClick: P }, m(a(n)("setting.title")), 1)
|
|
495
|
+
])
|
|
496
|
+
]))
|
|
497
|
+
]),
|
|
498
|
+
_: 1
|
|
499
|
+
}, 8, ["width", "panelTitle"])),
|
|
500
|
+
M.value && a(h)("isMobile") ? (r(), d("div", sl, [
|
|
501
|
+
l("div", al, [
|
|
502
|
+
p(N, {
|
|
503
|
+
width: 0.34,
|
|
504
|
+
"size-type": "rem",
|
|
505
|
+
"click-handle": P
|
|
506
|
+
})
|
|
507
|
+
]),
|
|
508
|
+
l("div", ol, m(a(n)("measure.settings")), 1),
|
|
509
|
+
l("div", nl, [
|
|
510
|
+
l("span", null, m(a(n)("measure.unitLabel")), 1),
|
|
511
|
+
p(y, {
|
|
512
|
+
modelValue: I.value,
|
|
513
|
+
"onUpdate:modelValue": t[3] || (t[3] = (s) => I.value = s),
|
|
514
|
+
teleported: !1,
|
|
515
|
+
placeholder: a(n)("measure.unitPlaceholder"),
|
|
516
|
+
style: { width: "136px", height: "28px" }
|
|
517
|
+
}, {
|
|
518
|
+
default: O(() => [
|
|
519
|
+
(r(), d(x, null, C(ge, (s) => p(v, {
|
|
520
|
+
key: s.value,
|
|
521
|
+
value: s.value
|
|
522
|
+
}, null, 8, ["value"])), 64))
|
|
523
|
+
]),
|
|
524
|
+
_: 1
|
|
525
|
+
}, 8, ["modelValue", "placeholder"])
|
|
526
|
+
]),
|
|
527
|
+
l("div", il, [
|
|
528
|
+
l("span", null, m(a(n)("measure.precisionLabel")), 1),
|
|
529
|
+
p(y, {
|
|
530
|
+
modelValue: A.value,
|
|
531
|
+
"onUpdate:modelValue": t[4] || (t[4] = (s) => A.value = s),
|
|
532
|
+
teleported: !1,
|
|
533
|
+
placeholder: a(n)("measure.precisionPlaceholder"),
|
|
534
|
+
style: { width: "136px", height: "28px" }
|
|
535
|
+
}, {
|
|
536
|
+
default: O(() => [
|
|
537
|
+
(r(), d(x, null, C(Me, (s) => p(v, {
|
|
538
|
+
key: s.value,
|
|
539
|
+
label: s.label,
|
|
540
|
+
value: s.value
|
|
541
|
+
}, null, 8, ["label", "value"])), 64))
|
|
542
|
+
]),
|
|
543
|
+
_: 1
|
|
544
|
+
}, 8, ["modelValue", "placeholder"])
|
|
545
|
+
]),
|
|
546
|
+
k.value === "elevation" ? (r(), d("div", ul, [
|
|
547
|
+
l("div", {
|
|
548
|
+
class: q(["datum_action", { datum_action_active: w.value }]),
|
|
549
|
+
onClick: Ae
|
|
550
|
+
}, m(a(n)("measure.setDatum")), 3)
|
|
551
|
+
])) : se("", !0),
|
|
552
|
+
l("div", cl, [
|
|
553
|
+
l("div", {
|
|
554
|
+
class: "mobile_set_button",
|
|
555
|
+
onClick: P
|
|
556
|
+
}, m(a(n)("common.cancel")), 1),
|
|
557
|
+
l("div", {
|
|
558
|
+
class: "mobile_set_button mobile_set_button_primary",
|
|
559
|
+
onClick: Se
|
|
560
|
+
}, m(a(n)("common.save")), 1)
|
|
561
|
+
])
|
|
562
|
+
])) : se("", !0),
|
|
563
|
+
We(p(_e, {
|
|
564
|
+
title: et.value,
|
|
565
|
+
"click-handle": tt
|
|
566
|
+
}, null, 8, ["title"]), [
|
|
567
|
+
[je, R.value]
|
|
568
|
+
]),
|
|
569
|
+
We(l("div", {
|
|
570
|
+
id: "measure_mouseGroup",
|
|
571
|
+
class: "mouse_group",
|
|
572
|
+
style: be({ left: `${ee.value}px`, top: `${te.value}px` })
|
|
573
|
+
}, [
|
|
574
|
+
l("img", {
|
|
575
|
+
id: "mouse_icon",
|
|
576
|
+
class: "mouse_icon",
|
|
577
|
+
src: `${a(E)}/industry-viewer/mouse-icon.svg`
|
|
578
|
+
}, null, 8, rl),
|
|
579
|
+
l("img", {
|
|
580
|
+
id: "mouse_img",
|
|
581
|
+
class: "mouse_img",
|
|
582
|
+
src: `${a(E)}/industry-viewer/mouse-active-large.svg`
|
|
583
|
+
}, null, 8, dl)
|
|
584
|
+
], 4), [
|
|
585
|
+
[je, H.value]
|
|
586
|
+
])
|
|
587
|
+
], 64);
|
|
588
|
+
};
|
|
589
|
+
}
|
|
590
|
+
}), fl = /* @__PURE__ */ wt(ml, [["__scopeId", "data-v-6f04cb89"]]);
|
|
591
|
+
export {
|
|
592
|
+
fl as default
|
|
593
|
+
};
|