@xtctwins/tctwins-bimx-engine 0.2.52 → 0.2.54
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AnnotationTool-Dt8mr8Pv.mjs +239 -0
- package/dist/BIMX_Viewer_Lib.es.js +1 -1
- package/dist/BIMX_Viewer_Lib.umd.js +83 -83
- package/dist/{CommentTool-C3hDmNLC.mjs → CommentTool-C7EjIHT-.mjs} +586 -594
- package/dist/{HiddenTool-D26ih-kX.mjs → HiddenTool-BmsQJILs.mjs} +1 -1
- package/dist/{InspectorTool-B058fBid.mjs → InspectorTool-Bov8jwXr.mjs} +28 -28
- package/dist/{MeasureTool-BgWpRhtI.mjs → MeasureTool-DVLt6Pqa.mjs} +4 -4
- package/dist/{MouseTool-DyeMRpWi.mjs → MouseTool-Bqd5Bmlr.mjs} +1 -1
- package/dist/{NavigateTool-6DcpLY_B.mjs → NavigateTool-YAKQUjOa.mjs} +1 -1
- package/dist/{RoamTool-Bgdy4dAF.mjs → RoamTool-CU4dpCTS.mjs} +1 -1
- package/dist/{ScreenShotTool-BLdvCs--.mjs → ScreenShotTool-XXjP20-m.mjs} +4 -4
- package/dist/{SectionTool-D4y-W2cu.mjs → SectionTool-BMMQBnYz.mjs} +22 -22
- package/dist/{SettingTool-D71E-pI1.mjs → SettingTool-BwYwYqNZ.mjs} +44 -44
- package/dist/{StructureTree-vv8HnIii.mjs → StructureTree-CrTd7vJp.mjs} +3 -3
- package/dist/{alert-DjNWlk8Z.mjs → alert-iUe8hu7Z.mjs} +1 -1
- package/dist/{el-input-number-CuLIf7kb.mjs → el-input-number-BE5izksC.mjs} +1 -1
- package/dist/{index-DjyQVMs9.mjs → index-DBpA3PFq.mjs} +1136 -1143
- package/dist/{panel.vue_vue_type_style_index_0_lang-CX1KJ-Ml.mjs → panel.vue_vue_type_style_index_0_lang-BmLQqrQm.mjs} +1 -1
- package/dist/style.css +1 -1
- package/dist/{tallPanel-CAEQJ3Ko.mjs → tallPanel-CgR65rDU.mjs} +1 -1
- package/package.json +1 -1
- package/types/components/BimViewerComponents/InspectorTool.vue.d.ts +2 -0
- package/types/components/BimViewerComponents/MeasureTool.vue.d.ts +2 -0
- package/types/components/BimViewerComponents/SectionTool.vue.d.ts +4 -0
- package/dist/AnnotationTool-BevJEQLf.mjs +0 -167
- /package/types/components/BimViewerComponents/MobileCommentsTool/{add.vue.d.ts → MobileCommentAdd.vue.d.ts} +0 -0
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
import { _ as F } from "./alert-iUe8hu7Z.mjs";
|
|
2
|
+
import { defineComponent as Y, ref as y, watch as G, onMounted as J, onBeforeUnmount as K, createElementBlock as s, openBlock as d, withDirectives as Q, unref as i, createCommentVNode as C, createElementVNode as m, normalizeClass as E, Fragment as N, renderList as x, toDisplayString as Z, createVNode as nn, vShow as en } from "vue";
|
|
3
|
+
import { A as on, B as tn, C as a, D as h, O as _, I as an } from "./index-DBpA3PFq.mjs";
|
|
4
|
+
import { A as f } from "./const-DOnRsYpZ.mjs";
|
|
5
|
+
const rn = { class: "annotation_component" }, ln = {
|
|
6
|
+
key: 0,
|
|
7
|
+
id: "annotation_toolbar",
|
|
8
|
+
class: "annotation_toolbar"
|
|
9
|
+
}, cn = {
|
|
10
|
+
key: 0,
|
|
11
|
+
class: "toolbar_trangle"
|
|
12
|
+
}, sn = { class: "annotation_toolbar_group" }, dn = ["id", "disabled", "onClick"], un = ["src"], mn = {
|
|
13
|
+
key: 1,
|
|
14
|
+
class: "toolbar_trangle"
|
|
15
|
+
}, _n = {
|
|
16
|
+
key: 1,
|
|
17
|
+
class: "mobile_annotation_toolbar"
|
|
18
|
+
}, fn = { class: "anno_toolList" }, bn = { class: "label-list" }, vn = ["onClick"], wn = { class: "item-img" }, gn = ["src"], Tn = { class: "item-name" }, pn = /* @__PURE__ */ Y({
|
|
19
|
+
__name: "AnnotationTool",
|
|
20
|
+
props: ["componentId"],
|
|
21
|
+
emits: ["uploadImage", "clickAnnotation", "emitHandler"],
|
|
22
|
+
setup(M, { emit: j }) {
|
|
23
|
+
const O = on(), I = tn(), B = M, D = j, $ = y(!0), u = y(""), W = y();
|
|
24
|
+
let c, P, v = !1, p = null, w = null;
|
|
25
|
+
const X = {
|
|
26
|
+
image: `${_}/BIMX_Website/main/mainView/function_icon/annotation_icons/image_active.png`,
|
|
27
|
+
file: `${_}/BIMX_Website/main/mainView/function_icon/annotation_icons/file_active.png`,
|
|
28
|
+
record: `${_}/BIMX_Website/main/mainView/function_icon/annotation_icons/record_active.png`,
|
|
29
|
+
text: `${_}/BIMX_Website/main/mainView/function_icon/annotation_icons/text_active.png`,
|
|
30
|
+
video: `${_}/BIMX_Website/main/mainView/function_icon/annotation_icons/video_active.png`
|
|
31
|
+
}, A = (n) => {
|
|
32
|
+
D("emitHandler", n);
|
|
33
|
+
};
|
|
34
|
+
G(
|
|
35
|
+
() => I.isToolActive(B.componentId),
|
|
36
|
+
(n) => {
|
|
37
|
+
var o, t;
|
|
38
|
+
if (n)
|
|
39
|
+
!v && ((t = window.bimViewer) != null && t.annotationTool) && g();
|
|
40
|
+
else if (u.value = "", (o = window.bimViewer) != null && o.annotationTool && typeof window.bimViewer.annotationTool.setEnabled == "function")
|
|
41
|
+
try {
|
|
42
|
+
window.bimViewer.annotationTool.setEnabled(!1);
|
|
43
|
+
} catch (e) {
|
|
44
|
+
console.warn("[AnnotationTool] setEnabled(false) on close failed:", e);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
), J(() => {
|
|
48
|
+
var n;
|
|
49
|
+
W.value = a("annoLimit"), I.setReadyById(B.componentId), !v && ((n = window.bimViewer) != null && n.annotationTool) && g();
|
|
50
|
+
}), K(() => {
|
|
51
|
+
if (h.off("BimViewer", g), h.off("setAnnoStatus", L), p && w) {
|
|
52
|
+
try {
|
|
53
|
+
p.removeEventListener("click", w);
|
|
54
|
+
} catch (n) {
|
|
55
|
+
console.warn("[AnnotationTool] remove canvas click listener failed:", n);
|
|
56
|
+
}
|
|
57
|
+
p = null, w = null;
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
function k(n) {
|
|
61
|
+
var o;
|
|
62
|
+
a("editPrivilege") != 1 && (!v && ((o = window.bimViewer) != null && o.annotationTool) && g(), u.value === n.code ? (u.value = "", S(n, !1)) : (u.value = n.code, S(n, !0)));
|
|
63
|
+
}
|
|
64
|
+
function L(n) {
|
|
65
|
+
const o = U(n.type);
|
|
66
|
+
o && k(o);
|
|
67
|
+
}
|
|
68
|
+
function g() {
|
|
69
|
+
if (!window.bimViewer || !window.bimViewer.annotationTool || !window.bimViewer.eventTrigger) {
|
|
70
|
+
console.warn("[AnnotationTool] bindEngineIntegration skipped: bimViewer/annotationTool/eventTrigger missing.");
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
if (v) return;
|
|
74
|
+
c = window.bimViewer.annotationTool, P = window.bimViewer.eventTrigger;
|
|
75
|
+
try {
|
|
76
|
+
c.setTypeImage(X);
|
|
77
|
+
} catch (e) {
|
|
78
|
+
console.warn("[AnnotationTool] setTypeImage failed:", e);
|
|
79
|
+
}
|
|
80
|
+
const n = (e, r) => {
|
|
81
|
+
const b = [
|
|
82
|
+
{ label: "annotationTool", obj: c },
|
|
83
|
+
{ label: "annotationTool.eventTrigger", obj: c == null ? void 0 : c.eventTrigger },
|
|
84
|
+
{ label: "bimViewer.eventTrigger", obj: P }
|
|
85
|
+
];
|
|
86
|
+
let T = 0;
|
|
87
|
+
for (const l of b)
|
|
88
|
+
if (l.obj && typeof l.obj.on == "function")
|
|
89
|
+
try {
|
|
90
|
+
l.obj.on(e, r), T++;
|
|
91
|
+
} catch (V) {
|
|
92
|
+
console.warn(`[AnnotationTool] bind '${e}' on ${l.label} failed:`, V);
|
|
93
|
+
}
|
|
94
|
+
T === 0 && console.error(`[AnnotationTool] no emitter accepted '${e}' subscription!`);
|
|
95
|
+
}, o = /* @__PURE__ */ new WeakSet(), t = (e) => !e || typeof e != "object" ? !1 : o.has(e) ? !0 : (o.add(e), !1);
|
|
96
|
+
n("createAnnotation", (e) => {
|
|
97
|
+
t(e) || A({
|
|
98
|
+
isTool: !0,
|
|
99
|
+
event_target: "AnnotationTool",
|
|
100
|
+
event_name: "createAnnotation",
|
|
101
|
+
content: { currentAnnotation: e }
|
|
102
|
+
});
|
|
103
|
+
}), n("markerClicked", (e) => {
|
|
104
|
+
t(e) || A({
|
|
105
|
+
isTool: !0,
|
|
106
|
+
event_target: "AnnotationTool",
|
|
107
|
+
event_name: "clickAnnotation",
|
|
108
|
+
content: { targetAnno: e }
|
|
109
|
+
});
|
|
110
|
+
}), a("isMobile") || n("requestDeleteMarker", (e) => {
|
|
111
|
+
A({
|
|
112
|
+
isTool: !0,
|
|
113
|
+
event_target: "AnnotationTool",
|
|
114
|
+
event_name: "requestDelAnno",
|
|
115
|
+
content: {
|
|
116
|
+
msg: "请求删除指定标注",
|
|
117
|
+
annoId: e
|
|
118
|
+
}
|
|
119
|
+
});
|
|
120
|
+
}), v = !0, R();
|
|
121
|
+
}
|
|
122
|
+
function S(n, o) {
|
|
123
|
+
q(o), H(n.code, o), A({
|
|
124
|
+
isTool: !0,
|
|
125
|
+
event_target: "AnnotationTool",
|
|
126
|
+
event_name: "clickAnnoTool",
|
|
127
|
+
content: {
|
|
128
|
+
active: o,
|
|
129
|
+
tool_type: n.code
|
|
130
|
+
}
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
function H(n, o) {
|
|
134
|
+
var t;
|
|
135
|
+
if ((t = window.bimViewer) != null && t.annotationTool)
|
|
136
|
+
try {
|
|
137
|
+
window.bimViewer.annotationTool.setCurrentType(n, o);
|
|
138
|
+
} catch {
|
|
139
|
+
try {
|
|
140
|
+
window.bimViewer.annotationTool.setCurrentType(n);
|
|
141
|
+
} catch (r) {
|
|
142
|
+
console.error("[AnnotationTool] setCurrentType failed:", r);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
function q(n) {
|
|
147
|
+
var o;
|
|
148
|
+
if ((o = window.bimViewer) != null && o.annotationTool)
|
|
149
|
+
try {
|
|
150
|
+
window.bimViewer.annotationTool.setEnabled(n);
|
|
151
|
+
} catch (t) {
|
|
152
|
+
console.error("[AnnotationTool] setEnabled error:", t);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
function R() {
|
|
156
|
+
var n, o, t, e, r, b, T;
|
|
157
|
+
try {
|
|
158
|
+
const l = ((e = (t = (o = (n = window.bimViewer) == null ? void 0 : n.viewer) == null ? void 0 : o.scene) == null ? void 0 : t.canvas) == null ? void 0 : e.canvas) || ((T = (b = (r = window.bimViewer) == null ? void 0 : r.scene) == null ? void 0 : b.canvas) == null ? void 0 : T.canvas);
|
|
159
|
+
if (!l || typeof l.addEventListener != "function") {
|
|
160
|
+
console.warn("[AnnotationTool] cannot locate xeokit canvas element to attach click listener.");
|
|
161
|
+
return;
|
|
162
|
+
}
|
|
163
|
+
p = l, w = (V) => {
|
|
164
|
+
if (!(!c || typeof c.clickToCreateAnno != "function"))
|
|
165
|
+
try {
|
|
166
|
+
c.clickToCreateAnno(V);
|
|
167
|
+
} catch (z) {
|
|
168
|
+
console.error("[AnnotationTool] clickToCreateAnno(event) error:", z);
|
|
169
|
+
}
|
|
170
|
+
}, l.addEventListener("click", w);
|
|
171
|
+
} catch (l) {
|
|
172
|
+
console.warn("[AnnotationTool] attach canvas click listener failed:", l);
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
function U(n) {
|
|
176
|
+
if (n === "image") return f[0];
|
|
177
|
+
if (n === "record") return f[1];
|
|
178
|
+
if (n === "video") return f[2];
|
|
179
|
+
if (n === "file") return f[3];
|
|
180
|
+
if (n === "text") return f[4];
|
|
181
|
+
}
|
|
182
|
+
return h.on("BimViewer", g), h.on("setAnnoStatus", L), (n, o) => {
|
|
183
|
+
const t = F;
|
|
184
|
+
return d(), s("div", rn, [
|
|
185
|
+
i(a)("isMobile") ? (d(), s("div", _n, [
|
|
186
|
+
m("div", fn, [
|
|
187
|
+
m("div", bn, [
|
|
188
|
+
(d(!0), s(N, null, x(i(f), (e, r) => (d(), s("div", {
|
|
189
|
+
key: r,
|
|
190
|
+
class: E(["label-item", { "label-item-active": u.value === e.code && i(a)("editPrivilege") == 0, noPermission: i(a)("editPrivilege") == 1 }]),
|
|
191
|
+
onClick: (b) => k(e)
|
|
192
|
+
}, [
|
|
193
|
+
m("div", wn, [
|
|
194
|
+
m("img", {
|
|
195
|
+
class: "label-item-img",
|
|
196
|
+
src: i(_) + `/bim-viewer/annotation/new-icons/bimkk-mobile-anno-${u.value === e.code && i(a)("editPrivilege") == 0 ? e.imgActive : e.img}.svg`,
|
|
197
|
+
alt: ""
|
|
198
|
+
}, null, 8, gn),
|
|
199
|
+
m("div", Tn, Z(i(O)(e.name)), 1)
|
|
200
|
+
])
|
|
201
|
+
], 10, vn))), 128))
|
|
202
|
+
])
|
|
203
|
+
])
|
|
204
|
+
])) : (d(), s("div", ln, [
|
|
205
|
+
i(a)("annotationPos").pos.includes("top") ? (d(), s("div", cn)) : C("", !0),
|
|
206
|
+
m("div", {
|
|
207
|
+
class: E(["annotation_toolbar_wrapper", { annotation_toolbar_wrapper_disable: i(a)("editPrivilege") == 1 }])
|
|
208
|
+
}, [
|
|
209
|
+
m("div", sn, [
|
|
210
|
+
(d(!0), s(N, null, x(i(f), (e, r) => (d(), s("button", {
|
|
211
|
+
id: `annotation_tool_btn_${r}`,
|
|
212
|
+
key: r,
|
|
213
|
+
class: E(["annotation_tool_btn", { active: u.value === e.code }]),
|
|
214
|
+
disabled: i(a)("editPrivilege") == 1,
|
|
215
|
+
onClick: (b) => k(e)
|
|
216
|
+
}, [
|
|
217
|
+
C("", !0),
|
|
218
|
+
m("img", {
|
|
219
|
+
src: `${i(_)}/bim-viewer/action-bars/panno-${u.value !== e.code ? e.img : e.imgActive}.svg`
|
|
220
|
+
}, null, 8, un)
|
|
221
|
+
], 10, dn))), 128))
|
|
222
|
+
])
|
|
223
|
+
], 2),
|
|
224
|
+
i(a)("annotationPos").pos.includes("bottom") ? (d(), s("div", mn)) : C("", !0)
|
|
225
|
+
])),
|
|
226
|
+
Q(nn(t, {
|
|
227
|
+
"click-handle": () => {
|
|
228
|
+
$.value = !1;
|
|
229
|
+
}
|
|
230
|
+
}, null, 8, ["click-handle"]), [
|
|
231
|
+
[en, $.value && i(a)("editPrivilege") == 0]
|
|
232
|
+
])
|
|
233
|
+
]);
|
|
234
|
+
};
|
|
235
|
+
}
|
|
236
|
+
}), yn = /* @__PURE__ */ an(pn, [["__scopeId", "data-v-b8684abf"]]);
|
|
237
|
+
export {
|
|
238
|
+
yn as default
|
|
239
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { at as e, M as t, au as o, aA as i, V as l, ax as n, ay as I, aD as r, av as C, az as f, aw as g, aB as u, aC as B, J as M } from "./index-
|
|
1
|
+
import { at as e, M as t, au as o, aA as i, V as l, ax as n, ay as I, aD as r, av as C, az as f, aw as g, aB as u, aC as B, J as M } from "./index-DBpA3PFq.mjs";
|
|
2
2
|
export {
|
|
3
3
|
e as BIMXViewer,
|
|
4
4
|
t as BIMX_CONFIGS,
|