@vsleem-realsee-viewer/projection-plugin 2.0.2 → 2.0.4

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.
@@ -0,0 +1,75 @@
1
+ import { defineComponent as _, ref as r, computed as w, watch as g, onMounted as h, createElementBlock as y, openBlock as N, createElementVNode as n, createVNode as c, createTextVNode as i, unref as d, withCtx as A } from "vue";
2
+ import { Point as C } from "@vsleem-realsee-viewer/shared";
3
+ import { A as V, U as k, V as z, x as S } from "./index-D64Q9Gg8.mjs";
4
+ const U = { class: "vsleem-scale-control" }, B = { class: "scale-wrapper" }, E = /* @__PURE__ */ _({
5
+ name: "ScaleControl",
6
+ __name: "ScaleControl",
7
+ props: {
8
+ currentModel: {},
9
+ points: {}
10
+ },
11
+ emits: ["change"],
12
+ setup(v, { expose: m, emit: I }) {
13
+ const a = v, l = r(""), s = r(1), u = r([
14
+ { label: "毫米(mm)", value: 1 },
15
+ { label: "米(m)", value: 1e3 },
16
+ { label: "千米(km)", value: 1e3 * 1e3 }
17
+ ]), f = w(() => u.value.find((t) => t.value === s.value));
18
+ g([() => a.points], p), h(() => {
19
+ p();
20
+ });
21
+ function p() {
22
+ var t, e;
23
+ if (((t = a.points) == null ? void 0 : t.length) === 2) {
24
+ const [o, b] = a.points || [];
25
+ l.value = (e = C.distXY(o, b)) == null ? void 0 : e.toFixed(2);
26
+ }
27
+ }
28
+ function x() {
29
+ var t;
30
+ if (Number(l.value) > 0) {
31
+ const e = ((t = f.value) == null ? void 0 : t.value) || 1;
32
+ return { points: [
33
+ { x: 0, y: 0, z: 0 },
34
+ { x: Number(l.value) * e, y: 0, z: 0 }
35
+ ] };
36
+ } else
37
+ throw z.error("请输入实际长度"), new Error("Actual length is a required field");
38
+ }
39
+ return m({
40
+ getData: x
41
+ }), (t, e) => (N(), y("div", U, [
42
+ n("div", B, [
43
+ e[2] || (e[2] = n("div", { class: "title-wrapper" }, [
44
+ n("div", null, [
45
+ i(" 请输入 "),
46
+ n("span", { style: { color: "#5bb36f" } }, " 定位点1 "),
47
+ i(" → "),
48
+ n("span", { style: { color: "#5bb36f" } }, " 定位点2 "),
49
+ i(" 实际长度 ")
50
+ ])
51
+ ], -1)),
52
+ c(d(V), {
53
+ value: l.value,
54
+ "onUpdate:value": e[1] || (e[1] = (o) => l.value = o),
55
+ size: "large",
56
+ style: { width: "350px", "border-radius": "8px", overflow: "hidden" }
57
+ }, {
58
+ addonAfter: A(() => [
59
+ c(d(k), {
60
+ value: s.value,
61
+ "onUpdate:value": e[0] || (e[0] = (o) => s.value = o),
62
+ size: "large",
63
+ style: { width: "120px", "background-color": "#fff" },
64
+ options: u.value
65
+ }, null, 8, ["value", "options"])
66
+ ]),
67
+ _: 1
68
+ }, 8, ["value"])
69
+ ])
70
+ ]));
71
+ }
72
+ }), F = /* @__PURE__ */ S(E, [["__scopeId", "data-v-456e4d28"]]);
73
+ export {
74
+ F as default
75
+ };
@@ -0,0 +1,4 @@
1
+ const a = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1755506756493" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="7226" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M578.641335 12.061143a43.560053 43.560053 0 0 1 61.009673 0.853282l237.468418 239.516296a43.560053 43.560053 0 0 1-2.218533 63.484191L302.732556 817.090175a43.560053 43.560053 0 0 1-29.60889 10.794019L60.955063 823.447127a43.560053 43.560053 0 0 1-42.664107-43.560054V564.475998a43.602717 43.602717 0 0 1 13.524522-31.571439z m57.809865 700.544634l326.551073 6.356952a43.602717 43.602717 0 0 1-1.706564 87.16277l-326.551074-6.356952a43.602717 43.602717 0 0 1 1.749229-87.16277z m-28.627616-608.006186L105.453726 583.034885v154.102753l152.481518 3.285137 524.768514-459.492431z m353.045484 825.849115a43.602717 43.602717 0 0 1 0.639961 87.162771L105.795039 1023.968429a43.602717 43.602717 0 1 1-0.639962-87.162771z" p-id="7227"></path></svg>';
2
+ export {
3
+ a as default
4
+ };