@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,167 +0,0 @@
|
|
|
1
|
-
import { _ as D } from "./alert-DN7oOiZl.mjs";
|
|
2
|
-
import { defineComponent as H, ref as p, watch as O, onMounted as q, onBeforeUnmount as F, openBlock as i, createElementBlock as a, unref as n, createCommentVNode as b, createElementVNode as c, normalizeClass as f, Fragment as B, renderList as C, toDisplayString as R, withDirectives as U, createVNode as z, vShow as G } from "vue";
|
|
3
|
-
import { F as j, G as J, H as o, I as v, P as r, M as K } from "./index-BzB8rqmg.mjs";
|
|
4
|
-
import { A as l } from "./const-DOnRsYpZ.mjs";
|
|
5
|
-
const Q = { class: "annotation_component" }, Y = {
|
|
6
|
-
key: 0,
|
|
7
|
-
id: "annotation_toolbar",
|
|
8
|
-
class: "annotation_toolbar"
|
|
9
|
-
}, Z = {
|
|
10
|
-
key: 0,
|
|
11
|
-
class: "toolbar_trangle"
|
|
12
|
-
}, ee = { class: "annotation_toolbar_group" }, ne = ["id", "disabled", "onClick"], te = ["src"], oe = {
|
|
13
|
-
key: 1,
|
|
14
|
-
class: "toolbar_trangle"
|
|
15
|
-
}, ie = {
|
|
16
|
-
key: 1,
|
|
17
|
-
class: "mobile_annotation_toolbar"
|
|
18
|
-
}, ae = { class: "anno_toolList" }, se = { class: "label-list" }, ce = ["onClick"], re = { class: "item-img" }, le = ["src"], _e = { class: "item-name" }, de = /* @__PURE__ */ H({
|
|
19
|
-
__name: "AnnotationTool",
|
|
20
|
-
props: ["componentId"],
|
|
21
|
-
emits: ["uploadImage", "clickAnnotation", "emitHandler"],
|
|
22
|
-
setup(P, { emit: $ }) {
|
|
23
|
-
const y = j(), w = J(), M = $, d = (e) => {
|
|
24
|
-
M("emitHandler", e);
|
|
25
|
-
};
|
|
26
|
-
let T;
|
|
27
|
-
const A = p(!0), s = p("");
|
|
28
|
-
let m;
|
|
29
|
-
const S = p(), h = P;
|
|
30
|
-
O(
|
|
31
|
-
() => w.isToolActive(h.componentId),
|
|
32
|
-
(e) => {
|
|
33
|
-
e || (s.value = "");
|
|
34
|
-
}
|
|
35
|
-
), q(() => {
|
|
36
|
-
S.value = o("annoLimit"), w.setReadyById(h.componentId);
|
|
37
|
-
});
|
|
38
|
-
const x = {
|
|
39
|
-
image: `${r}/BIMX_Website/main/mainView/function_icon/annotation_icons/image_active.png`,
|
|
40
|
-
file: `${r}/BIMX_Website/main/mainView/function_icon/annotation_icons/file_active.png`,
|
|
41
|
-
record: `${r}/BIMX_Website/main/mainView/function_icon/annotation_icons/record_active.png`,
|
|
42
|
-
text: `${r}/BIMX_Website/main/mainView/function_icon/annotation_icons/text_active.png`,
|
|
43
|
-
video: `${r}/BIMX_Website/main/mainView/function_icon/annotation_icons/video_active.png`
|
|
44
|
-
}, k = () => {
|
|
45
|
-
T = window.bimViewer.annotationTool, T.setTypeImage(x), m = window.bimViewer.eventTrigger, m.on("createAnnotation", (e) => {
|
|
46
|
-
d({
|
|
47
|
-
isTool: !0,
|
|
48
|
-
event_target: "AnnotationTool",
|
|
49
|
-
event_name: "createAnnotation",
|
|
50
|
-
content: {
|
|
51
|
-
currentAnnotation: e
|
|
52
|
-
}
|
|
53
|
-
});
|
|
54
|
-
}), m.on("markerClicked", (e) => {
|
|
55
|
-
d({
|
|
56
|
-
isTool: !0,
|
|
57
|
-
event_target: "AnnotationTool",
|
|
58
|
-
event_name: "clickAnnotation",
|
|
59
|
-
content: {
|
|
60
|
-
targetAnno: e
|
|
61
|
-
}
|
|
62
|
-
});
|
|
63
|
-
}), o("isMobile") || m.on("requestDeleteMarker", (e) => {
|
|
64
|
-
d({
|
|
65
|
-
isTool: !0,
|
|
66
|
-
event_target: "AnnotationTool",
|
|
67
|
-
event_name: "requestDelAnno",
|
|
68
|
-
content: {
|
|
69
|
-
msg: "请求删除指定标注",
|
|
70
|
-
annoId: e
|
|
71
|
-
}
|
|
72
|
-
});
|
|
73
|
-
});
|
|
74
|
-
};
|
|
75
|
-
v.on("BimViewer", k);
|
|
76
|
-
const I = (e) => {
|
|
77
|
-
g(L(e.type));
|
|
78
|
-
};
|
|
79
|
-
v.on("setAnnoStatus", I), F(() => {
|
|
80
|
-
v.off("BimViewer", k), v.off("setAnnoStatus", I);
|
|
81
|
-
});
|
|
82
|
-
const L = (e) => {
|
|
83
|
-
if (e === "image")
|
|
84
|
-
return l[0];
|
|
85
|
-
if (e === "record")
|
|
86
|
-
return l[1];
|
|
87
|
-
if (e === "video")
|
|
88
|
-
return l[2];
|
|
89
|
-
if (e === "file")
|
|
90
|
-
return l[3];
|
|
91
|
-
if (e === "text")
|
|
92
|
-
return l[4];
|
|
93
|
-
}, g = (e) => {
|
|
94
|
-
o("editPrivilege") != 1 && (s.value === e.code ? (s.value = "", V(e, !1)) : (s.value = e.code, V(e, !0)));
|
|
95
|
-
}, N = (e) => {
|
|
96
|
-
window.bimViewer.annotationTool.setEnabled(e);
|
|
97
|
-
}, V = (e, _) => {
|
|
98
|
-
N(_), E(e.code, _);
|
|
99
|
-
}, E = (e, _) => {
|
|
100
|
-
window.bimViewer.annotationTool.setCurrentType(e), d({
|
|
101
|
-
isTool: !0,
|
|
102
|
-
event_target: "AnnotationTool",
|
|
103
|
-
event_name: "clickAnnoTool",
|
|
104
|
-
content: {
|
|
105
|
-
active: _,
|
|
106
|
-
tool_type: e
|
|
107
|
-
}
|
|
108
|
-
});
|
|
109
|
-
};
|
|
110
|
-
return (e, _) => {
|
|
111
|
-
const W = D;
|
|
112
|
-
return i(), a("div", Q, [
|
|
113
|
-
n(o)("isMobile") ? (i(), a("div", ie, [
|
|
114
|
-
c("div", ae, [
|
|
115
|
-
c("div", se, [
|
|
116
|
-
(i(!0), a(B, null, C(n(l), (t, u) => (i(), a("div", {
|
|
117
|
-
key: u,
|
|
118
|
-
class: f(["label-item", { "label-item-active": s.value === t.code && n(o)("editPrivilege") == 0, noPermission: n(o)("editPrivilege") == 1 }]),
|
|
119
|
-
onClick: (X) => g(t)
|
|
120
|
-
}, [
|
|
121
|
-
c("div", re, [
|
|
122
|
-
c("img", {
|
|
123
|
-
class: "label-item-img",
|
|
124
|
-
src: n(r) + `/bim-viewer/annotation/new-icons/bimkk-mobile-anno-${s.value === t.code && n(o)("editPrivilege") == 0 ? t.imgActive : t.img}.svg`,
|
|
125
|
-
alt: ""
|
|
126
|
-
}, null, 8, le),
|
|
127
|
-
c("div", _e, R(n(y)(t.name)), 1)
|
|
128
|
-
])
|
|
129
|
-
], 10, ce))), 128))
|
|
130
|
-
])
|
|
131
|
-
])
|
|
132
|
-
])) : (i(), a("div", Y, [
|
|
133
|
-
n(o)("annotationPos").pos.includes("top") ? (i(), a("div", Z)) : b("", !0),
|
|
134
|
-
c("div", {
|
|
135
|
-
class: f(["annotation_toolbar_wrapper", { annotation_toolbar_wrapper_disable: n(o)("editPrivilege") == 1 }])
|
|
136
|
-
}, [
|
|
137
|
-
c("div", ee, [
|
|
138
|
-
(i(!0), a(B, null, C(n(l), (t, u) => (i(), a("button", {
|
|
139
|
-
id: `annotation_tool_btn_${u}`,
|
|
140
|
-
key: u,
|
|
141
|
-
class: f(["annotation_tool_btn", { active: s.value === t.code }]),
|
|
142
|
-
disabled: n(o)("editPrivilege") == 1,
|
|
143
|
-
onClick: (X) => g(t)
|
|
144
|
-
}, [
|
|
145
|
-
b("", !0),
|
|
146
|
-
c("img", {
|
|
147
|
-
src: `${n(r)}/bim-viewer/action-bars/panno-${s.value !== t.code ? t.img : t.imgActive}.svg`
|
|
148
|
-
}, null, 8, te)
|
|
149
|
-
], 10, ne))), 128))
|
|
150
|
-
])
|
|
151
|
-
], 2),
|
|
152
|
-
n(o)("annotationPos").pos.includes("bottom") ? (i(), a("div", oe)) : b("", !0)
|
|
153
|
-
])),
|
|
154
|
-
U(z(W, {
|
|
155
|
-
"click-handle": () => {
|
|
156
|
-
A.value = !1;
|
|
157
|
-
}
|
|
158
|
-
}, null, 8, ["click-handle"]), [
|
|
159
|
-
[G, A.value && n(o)("editPrivilege") == 0]
|
|
160
|
-
])
|
|
161
|
-
]);
|
|
162
|
-
};
|
|
163
|
-
}
|
|
164
|
-
}), pe = /* @__PURE__ */ K(de, [["__scopeId", "data-v-7c08da5a"]]);
|
|
165
|
-
export {
|
|
166
|
-
pe as default
|
|
167
|
-
};
|
|
@@ -1,164 +0,0 @@
|
|
|
1
|
-
import { G as Y, H as z, I as x, V as A, P as y, M as G } from "./index-DfRswjrC.mjs";
|
|
2
|
-
import { defineComponent as O, ref as l, watch as k, onMounted as W, onBeforeUnmount as j, openBlock as u, createElementBlock as g, normalizeClass as T, createElementVNode as t, createBlock as q, withCtx as F, unref as B, withDirectives as I, vModelText as N, createCommentVNode as J } from "vue";
|
|
3
|
-
const K = { class: "cameraView_tool_btn" }, Q = ["src"], Z = {
|
|
4
|
-
key: 1,
|
|
5
|
-
class: "cameraView_tool_btn"
|
|
6
|
-
}, ee = ["src"], te = { class: "dialog-container" }, oe = { class: "dialog-header" }, ae = { class: "dialog-content" }, se = { class: "preview-shot" }, ne = ["src"], le = { class: "form-group" }, ie = { class: "form-group" }, ce = { class: "dialog-footer" }, re = /* @__PURE__ */ O({
|
|
7
|
-
__name: "CameraViewTool",
|
|
8
|
-
props: ["componentId", "instruction"],
|
|
9
|
-
emits: ["emitHandler"],
|
|
10
|
-
setup(E, { emit: S }) {
|
|
11
|
-
const V = Y();
|
|
12
|
-
let v;
|
|
13
|
-
const w = l(!z("isMobile")), p = E;
|
|
14
|
-
k(
|
|
15
|
-
() => V.isToolActive(p.componentId),
|
|
16
|
-
(o) => {
|
|
17
|
-
}
|
|
18
|
-
), k(
|
|
19
|
-
() => p.instruction,
|
|
20
|
-
(o) => {
|
|
21
|
-
if (o && o.instruct_name == "setCameraView") {
|
|
22
|
-
const e = o.content.cameraView;
|
|
23
|
-
v.flyToNewView({ ...e, duration: 1 });
|
|
24
|
-
}
|
|
25
|
-
},
|
|
26
|
-
{ deep: !0 }
|
|
27
|
-
), W(() => {
|
|
28
|
-
V.setReadyById(p.componentId);
|
|
29
|
-
});
|
|
30
|
-
const _ = () => {
|
|
31
|
-
v = window.bimViewer, window.bimViewer.eventTrigger;
|
|
32
|
-
};
|
|
33
|
-
x.on("BimViewer", _);
|
|
34
|
-
const H = (o, e) => {
|
|
35
|
-
const a = document.getElementById("myCanvas"), s = document.createElement("a");
|
|
36
|
-
s.download = "screenshot.png";
|
|
37
|
-
const d = document.createElement("canvas"), i = d.getContext("2d");
|
|
38
|
-
if (a && i) {
|
|
39
|
-
d.width = o, d.height = e;
|
|
40
|
-
const D = o / a.width, L = e / a.height, b = Math.max(D, L), C = a.width * b, h = a.height * b, P = (o - C) / 2, X = (e - h) / 2;
|
|
41
|
-
return i.clearRect(0, 0, o, e), i.fillStyle = "transparent", i.fillRect(0, 0, o, e), i.drawImage(a, 0, 0, a.width, a.height, P, X, C, h), d.toDataURL("image/png");
|
|
42
|
-
} else
|
|
43
|
-
return "";
|
|
44
|
-
}, M = S, R = (o) => {
|
|
45
|
-
M("emitHandler", o);
|
|
46
|
-
}, c = l(""), r = l(""), n = l(!1), m = l(""), f = l(), U = () => {
|
|
47
|
-
n.value = !0, f.value = v.getCameraView(), m.value = H(220, 124);
|
|
48
|
-
}, $ = () => {
|
|
49
|
-
R({
|
|
50
|
-
isTool: !0,
|
|
51
|
-
event_target: "CameraViewTool",
|
|
52
|
-
event_name: "newCameraView",
|
|
53
|
-
content: {
|
|
54
|
-
cameraView: f.value,
|
|
55
|
-
title: c.value,
|
|
56
|
-
description: r.value,
|
|
57
|
-
img_data: m.value
|
|
58
|
-
}
|
|
59
|
-
}), n.value = !1, c.value = "", r.value = "", f.value = null, m.value = "";
|
|
60
|
-
};
|
|
61
|
-
return j(() => {
|
|
62
|
-
x.off("BimViewer", _);
|
|
63
|
-
}), (o, e) => {
|
|
64
|
-
const a = A;
|
|
65
|
-
return u(), g("div", {
|
|
66
|
-
class: T(["cameraView_component", { is_mobile: !w.value }])
|
|
67
|
-
}, [
|
|
68
|
-
t("div", {
|
|
69
|
-
class: "new_btn",
|
|
70
|
-
onClick: U
|
|
71
|
-
}, [
|
|
72
|
-
w.value ? (u(), q(a, {
|
|
73
|
-
key: 0,
|
|
74
|
-
content: "添加视角",
|
|
75
|
-
placement: "top",
|
|
76
|
-
effect: "light"
|
|
77
|
-
}, {
|
|
78
|
-
default: F(() => [
|
|
79
|
-
t("div", K, [
|
|
80
|
-
t("img", {
|
|
81
|
-
class: "img",
|
|
82
|
-
src: `${B(y)}/bim-viewer/cameraView/cameraViewNew.svg`,
|
|
83
|
-
alt: ""
|
|
84
|
-
}, null, 8, Q)
|
|
85
|
-
])
|
|
86
|
-
]),
|
|
87
|
-
_: 1
|
|
88
|
-
})) : (u(), g("div", Z, [
|
|
89
|
-
t("img", {
|
|
90
|
-
class: "img",
|
|
91
|
-
src: `${B(y)}/bim-viewer/cameraView/cameraViewNew.svg`,
|
|
92
|
-
alt: ""
|
|
93
|
-
}, null, 8, ee)
|
|
94
|
-
]))
|
|
95
|
-
]),
|
|
96
|
-
n.value ? (u(), g("div", {
|
|
97
|
-
key: 0,
|
|
98
|
-
class: T(["newViewDialog", { mobile_dialog: !w.value }])
|
|
99
|
-
}, [
|
|
100
|
-
t("div", {
|
|
101
|
-
class: "dialog-overlay",
|
|
102
|
-
onClick: e[0] || (e[0] = (s) => n.value = !1)
|
|
103
|
-
}),
|
|
104
|
-
t("div", te, [
|
|
105
|
-
t("div", oe, [
|
|
106
|
-
e[6] || (e[6] = t("span", { class: "dialog-title" }, "添加视角", -1)),
|
|
107
|
-
t("button", {
|
|
108
|
-
class: "dialog-close",
|
|
109
|
-
onClick: e[1] || (e[1] = (s) => n.value = !1)
|
|
110
|
-
}, [...e[5] || (e[5] = [
|
|
111
|
-
t("span", null, "✕", -1)
|
|
112
|
-
])])
|
|
113
|
-
]),
|
|
114
|
-
t("div", ae, [
|
|
115
|
-
t("div", se, [
|
|
116
|
-
t("img", {
|
|
117
|
-
src: m.value,
|
|
118
|
-
alt: "视角预览"
|
|
119
|
-
}, null, 8, ne)
|
|
120
|
-
]),
|
|
121
|
-
t("div", le, [
|
|
122
|
-
e[7] || (e[7] = t("label", { class: "form-label" }, "视角名称", -1)),
|
|
123
|
-
I(t("input", {
|
|
124
|
-
"onUpdate:modelValue": e[2] || (e[2] = (s) => c.value = s),
|
|
125
|
-
type: "text",
|
|
126
|
-
class: "form-input",
|
|
127
|
-
placeholder: "请输入视角名称",
|
|
128
|
-
maxlength: "50"
|
|
129
|
-
}, null, 512), [
|
|
130
|
-
[N, c.value]
|
|
131
|
-
])
|
|
132
|
-
]),
|
|
133
|
-
t("div", ie, [
|
|
134
|
-
e[8] || (e[8] = t("label", { class: "form-label" }, "视角描述", -1)),
|
|
135
|
-
I(t("textarea", {
|
|
136
|
-
"onUpdate:modelValue": e[3] || (e[3] = (s) => r.value = s),
|
|
137
|
-
class: "form-textarea",
|
|
138
|
-
placeholder: "请输入视角描述",
|
|
139
|
-
maxlength: "200",
|
|
140
|
-
rows: "4"
|
|
141
|
-
}, null, 512), [
|
|
142
|
-
[N, r.value]
|
|
143
|
-
])
|
|
144
|
-
])
|
|
145
|
-
]),
|
|
146
|
-
t("div", ce, [
|
|
147
|
-
t("button", {
|
|
148
|
-
class: "btn btn-secondary",
|
|
149
|
-
onClick: e[4] || (e[4] = (s) => n.value = !1)
|
|
150
|
-
}, "取 消"),
|
|
151
|
-
t("button", {
|
|
152
|
-
class: "btn btn-primary",
|
|
153
|
-
onClick: $
|
|
154
|
-
}, "确 定")
|
|
155
|
-
])
|
|
156
|
-
])
|
|
157
|
-
], 2)) : J("", !0)
|
|
158
|
-
], 2);
|
|
159
|
-
};
|
|
160
|
-
}
|
|
161
|
-
}), ue = /* @__PURE__ */ G(re, [["__scopeId", "data-v-2c9174bb"]]);
|
|
162
|
-
export {
|
|
163
|
-
ue as default
|
|
164
|
-
};
|