@glodon-aiot/react-components 3.5.2-beta.0 → 3.5.2-snapshot.0
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/es/Button/index.mjs +1 -1
- package/dist/es/ConfirmableButton/index.mjs +29 -29
- package/dist/es/Drawable/Drawable.mjs +84 -84
- package/dist/es/Drawable/LineElement.mjs +2 -2
- package/dist/es/Drawable/MarkerElement.mjs +4 -4
- package/dist/es/Drawable/PolygonElement.mjs +15 -15
- package/dist/es/Drawable/state.mjs +27 -27
- package/dist/es/ExpandablePannel/index.mjs +18 -18
- package/dist/es/GOSImageMap/DrawableImageMap.mjs +18 -18
- package/dist/es/GOSImageMap/ImageMap.mjs +1 -1
- package/dist/es/IconButton/index.mjs +1 -1
- package/dist/es/ImageMap/index.mjs +120 -120
- package/dist/es/MouseTip/index.mjs +10 -10
- package/dist/es/PanoramaRecordPlayer/index.mjs +21 -21
- package/dist/es/PassMap/index.mjs +6 -6
- package/dist/es/TrackMap/PointTooltip.mjs +44 -42
- package/dist/es/TrackMap/TrackPoint.mjs +10 -10
- package/dist/es/TrackMap/index.mjs +158 -158
- package/dist/es/Zoom/index.mjs +19 -19
- package/dist/es/components/Copy/index.mjs +12 -12
- package/dist/es/components/Markdown/ATag/index.mjs +4 -4
- package/dist/es/components/Markdown/Code/index.mjs +14 -14
- package/dist/es/components/Markdown/Image/index.mjs +5 -5
- package/dist/es/components/Markdown/Video/index.mjs +1 -1
- package/dist/es/components/Markdown/index.mjs +11 -11
- package/dist/es/index.mjs +1 -1
- package/dist/lib/index.js +2 -2
- package/dist/src/Drawable/PolygonElement.d.ts +1 -1
- package/dist/src/GOSImageMap/DrawableImageMap.d.ts +1 -1
- package/dist/src/useBimface/index.d.ts +2 -2
- package/dist/src/utils/markdown/index.d.ts +1 -1
- package/package.json +1 -1
|
@@ -9,7 +9,7 @@ var N = (t, n, o) => n in t ? _(t, n, { enumerable: !0, configurable: !0, writab
|
|
|
9
9
|
A.call(n, o) && N(t, o, n[o]);
|
|
10
10
|
return t;
|
|
11
11
|
};
|
|
12
|
-
import {
|
|
12
|
+
import { jsx as l, jsxs as $ } from "react/jsx-runtime";
|
|
13
13
|
import { useRef as w, useState as f, useEffect as z } from "react";
|
|
14
14
|
import "./style.less.mjs";
|
|
15
15
|
import { Iconfont as p } from "../Iconfont/index.mjs";
|
|
@@ -23,22 +23,22 @@ const U = (t) => {
|
|
|
23
23
|
visible: F,
|
|
24
24
|
mode: a = "normal",
|
|
25
25
|
header: m,
|
|
26
|
-
icons:
|
|
27
|
-
collapseButton:
|
|
26
|
+
icons: r = {
|
|
27
|
+
collapseButton: l(p, {
|
|
28
28
|
type: "icon-yincang"
|
|
29
29
|
}),
|
|
30
|
-
expandButton:
|
|
30
|
+
expandButton: l(p, {
|
|
31
31
|
type: "icon-yincang"
|
|
32
32
|
}),
|
|
33
|
-
fullscreenButton:
|
|
33
|
+
fullscreenButton: l(p, {
|
|
34
34
|
type: "icon-suofang"
|
|
35
35
|
}),
|
|
36
|
-
exitFullscreenButton:
|
|
36
|
+
exitFullscreenButton: l(p, {
|
|
37
37
|
type: "icon-suofang"
|
|
38
38
|
})
|
|
39
39
|
},
|
|
40
40
|
extraButtons: D = [],
|
|
41
|
-
onNormalize:
|
|
41
|
+
onNormalize: d,
|
|
42
42
|
onMinimize: h,
|
|
43
43
|
onMaximize: y
|
|
44
44
|
} = t, [i, b] = f(a === "max"), [s, B] = f(a === "min"), v = w(null), [G, u] = f(a);
|
|
@@ -46,9 +46,9 @@ const U = (t) => {
|
|
|
46
46
|
b(a === "max"), B(a === "min"), u(a);
|
|
47
47
|
}, [a]);
|
|
48
48
|
const T = () => {
|
|
49
|
-
b(!i), u(i ? "normal" : "max"), i ?
|
|
49
|
+
b(!i), u(i ? "normal" : "max"), i ? d && d() : y && y();
|
|
50
50
|
}, C = () => {
|
|
51
|
-
B(!s), u(s ? "normal" : "min"), s ?
|
|
51
|
+
B(!s), u(s ? "normal" : "min"), s ? d && d() : h && h();
|
|
52
52
|
};
|
|
53
53
|
z(() => {
|
|
54
54
|
v.current && i && (v.current.style.transform = "none");
|
|
@@ -60,31 +60,31 @@ const U = (t) => {
|
|
|
60
60
|
width: s ? 0 : e == null ? void 0 : e.width,
|
|
61
61
|
height: e == null ? void 0 : e.height
|
|
62
62
|
};
|
|
63
|
-
return
|
|
63
|
+
return $("div", {
|
|
64
64
|
className: "g-expandable-pannel-wrap",
|
|
65
65
|
style: g({
|
|
66
66
|
visibility: F !== !1 ? "visible" : "hidden",
|
|
67
67
|
position: i && !s ? "absolute" : "unset"
|
|
68
68
|
}, i ? P : null),
|
|
69
69
|
ref: n,
|
|
70
|
-
children: [!s &&
|
|
70
|
+
children: [!s && $("div", {
|
|
71
71
|
className: `g-expandable-pannel ${i ? "full" : ""} `,
|
|
72
72
|
style: g({}, j),
|
|
73
|
-
children: [m != null ? m :
|
|
73
|
+
children: [m != null ? m : l("div", {
|
|
74
74
|
className: `g-expandable-pannel-header ${c != null ? c : ""}`,
|
|
75
|
-
children:
|
|
75
|
+
children: l(E, {
|
|
76
76
|
onClick: T,
|
|
77
|
-
children: i ?
|
|
77
|
+
children: i ? r.exitFullscreenButton : r.fullscreenButton
|
|
78
78
|
})
|
|
79
|
-
}),
|
|
79
|
+
}), l("div", {
|
|
80
80
|
className: "g-expandable-pannel-body",
|
|
81
81
|
children: t.children
|
|
82
82
|
})]
|
|
83
|
-
}),
|
|
83
|
+
}), l("div", {
|
|
84
84
|
className: `g-expandable-pannel-expand-bar ${s ? "collapsed" : "expaned"} ${c != null ? c : ""}`,
|
|
85
|
-
children:
|
|
85
|
+
children: l(E, {
|
|
86
86
|
onClick: C,
|
|
87
|
-
children: s ?
|
|
87
|
+
children: s ? r.expandButton : r.collapseButton
|
|
88
88
|
})
|
|
89
89
|
})]
|
|
90
90
|
});
|
|
@@ -1,47 +1,47 @@
|
|
|
1
1
|
var f = Object.defineProperty;
|
|
2
2
|
var i = Object.getOwnPropertySymbols;
|
|
3
3
|
var n = Object.prototype.hasOwnProperty, p = Object.prototype.propertyIsEnumerable;
|
|
4
|
-
var s = (e, a,
|
|
5
|
-
for (var
|
|
6
|
-
n.call(a,
|
|
4
|
+
var s = (e, a, r) => a in e ? f(e, a, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[a] = r, l = (e, a) => {
|
|
5
|
+
for (var r in a || (a = {}))
|
|
6
|
+
n.call(a, r) && s(e, r, a[r]);
|
|
7
7
|
if (i)
|
|
8
|
-
for (var
|
|
9
|
-
p.call(a,
|
|
8
|
+
for (var r of i(a))
|
|
9
|
+
p.call(a, r) && s(e, r, a[r]);
|
|
10
10
|
return e;
|
|
11
11
|
};
|
|
12
12
|
var c = (e, a) => {
|
|
13
|
-
var
|
|
14
|
-
for (var
|
|
15
|
-
n.call(e,
|
|
13
|
+
var r = {};
|
|
14
|
+
for (var t in e)
|
|
15
|
+
n.call(e, t) && a.indexOf(t) < 0 && (r[t] = e[t]);
|
|
16
16
|
if (e != null && i)
|
|
17
|
-
for (var
|
|
18
|
-
a.indexOf(
|
|
19
|
-
return
|
|
17
|
+
for (var t of i(e))
|
|
18
|
+
a.indexOf(t) < 0 && p.call(e, t) && (r[t] = e[t]);
|
|
19
|
+
return r;
|
|
20
20
|
};
|
|
21
|
-
import { jsxs as w, jsx as
|
|
21
|
+
import { jsxs as w, jsx as u } from "react/jsx-runtime";
|
|
22
22
|
import { useImmer as S } from "use-immer";
|
|
23
23
|
import x from "./ImageMap.mjs";
|
|
24
24
|
import I from "../Drawable/Drawable.mjs";
|
|
25
25
|
function k(e) {
|
|
26
26
|
const m = e, {
|
|
27
27
|
url: a
|
|
28
|
-
} = m,
|
|
28
|
+
} = m, r = c(m, [
|
|
29
29
|
"url"
|
|
30
|
-
]), [
|
|
30
|
+
]), [t, h] = S({
|
|
31
31
|
scale: 1,
|
|
32
32
|
width: 0,
|
|
33
33
|
height: 0
|
|
34
34
|
});
|
|
35
|
-
return a ?
|
|
35
|
+
return a ? w("div", {
|
|
36
36
|
className: "relative bg-pink-500 bg-opacity-40",
|
|
37
|
-
children: [
|
|
37
|
+
children: [u(x, {
|
|
38
38
|
url: a,
|
|
39
39
|
onScaleChange: (g, b, d) => {
|
|
40
|
-
|
|
40
|
+
h((o) => {
|
|
41
41
|
o.scale = g, o.width = b, o.height = d;
|
|
42
42
|
});
|
|
43
43
|
}
|
|
44
|
-
}),
|
|
44
|
+
}), u(I, l(l({}, r), t))]
|
|
45
45
|
}) : null;
|
|
46
46
|
}
|
|
47
47
|
export {
|
|
@@ -9,7 +9,7 @@ function N(i) {
|
|
|
9
9
|
} = i, e = g(null), t = f(e), r = t == null ? void 0 : t.width, a = t == null ? void 0 : t.height, [o, u] = d();
|
|
10
10
|
return p(() => {
|
|
11
11
|
r && a && o && c(r / o.width, r, a);
|
|
12
|
-
}, [r, a, o]),
|
|
12
|
+
}, [r, a, o]), l("img", {
|
|
13
13
|
ref: e,
|
|
14
14
|
src: s,
|
|
15
15
|
className: "select-none",
|
|
@@ -14,7 +14,7 @@ import { jsx as s } from "react/jsx-runtime";
|
|
|
14
14
|
import "./style.less.mjs";
|
|
15
15
|
const g = (n) => {
|
|
16
16
|
var t;
|
|
17
|
-
return
|
|
17
|
+
return s("button", i(m({}, n), {
|
|
18
18
|
className: `g-icon-btn disabled ${(t = n == null ? void 0 : n.className) != null ? t : ""}`
|
|
19
19
|
}));
|
|
20
20
|
};
|
|
@@ -1,56 +1,56 @@
|
|
|
1
|
-
import { jsxs as b, jsx as i, Fragment as
|
|
2
|
-
import { forwardRef as dt, useRef as
|
|
1
|
+
import { jsxs as b, jsx as i, Fragment as Pe } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as dt, useRef as Ce, useState as a, useEffect as X, useImperativeHandle as gt } from "react";
|
|
3
3
|
import "./style.less.mjs";
|
|
4
|
-
import {
|
|
5
|
-
import { TrackMap as
|
|
6
|
-
import
|
|
7
|
-
import { Zoom as yt } from "../Zoom/index.mjs";
|
|
8
|
-
import Bt from "antd/es/button";
|
|
4
|
+
import { PassMap as pt } from "../PassMap/index.mjs";
|
|
5
|
+
import { TrackMap as ht } from "../TrackMap/index.mjs";
|
|
6
|
+
import vt from "antd/es/button";
|
|
9
7
|
import Ee from "../ConfirmableButton/index.mjs";
|
|
10
|
-
import { SaveOutlined as
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
import { SaveOutlined as yt } from "@ant-design/icons";
|
|
9
|
+
import { Zoom as Bt } from "../Zoom/index.mjs";
|
|
10
|
+
import { Iconfont as bt } from "../Iconfont/index.mjs";
|
|
11
|
+
let Ne;
|
|
12
|
+
const zt = dt((we, ze) => {
|
|
13
|
+
var ie, ae, ce, le, re, ue, fe, me, de, ge, pe, he, ve, ye, Be, be, Ie, Se, xe, Me, ke;
|
|
14
14
|
const {
|
|
15
|
-
url:
|
|
16
|
-
points:
|
|
15
|
+
url: Te,
|
|
16
|
+
points: C,
|
|
17
17
|
pointSize: We,
|
|
18
18
|
direction: He,
|
|
19
19
|
activePointId: Ye,
|
|
20
20
|
lineStyle: Xe,
|
|
21
21
|
pointStyle: Re,
|
|
22
22
|
directionStyle: Le,
|
|
23
|
-
onPointClick:
|
|
23
|
+
onPointClick: De,
|
|
24
24
|
passes: E,
|
|
25
25
|
activePassId: Oe,
|
|
26
|
-
passStyle:
|
|
27
|
-
activePassStyle:
|
|
28
|
-
marks:
|
|
29
|
-
draggable:
|
|
30
|
-
offsetEdge:
|
|
31
|
-
zoomable:
|
|
32
|
-
zoomStep:
|
|
33
|
-
zoomMax:
|
|
34
|
-
zoomMin:
|
|
35
|
-
onImageLoad:
|
|
36
|
-
trackEditable:
|
|
26
|
+
passStyle: $e,
|
|
27
|
+
activePassStyle: Fe,
|
|
28
|
+
marks: je,
|
|
29
|
+
draggable: h = !1,
|
|
30
|
+
offsetEdge: Ue = [50, 50, 50, 50],
|
|
31
|
+
zoomable: $ = !1,
|
|
32
|
+
zoomStep: S = 0.02,
|
|
33
|
+
zoomMax: x = 2,
|
|
34
|
+
zoomMin: M = 0,
|
|
35
|
+
onImageLoad: F,
|
|
36
|
+
trackEditable: j,
|
|
37
37
|
trackEditing: R,
|
|
38
|
-
keepRatio:
|
|
39
|
-
transform:
|
|
38
|
+
keepRatio: Ve,
|
|
39
|
+
transform: Ze,
|
|
40
40
|
onTrackEditingChange: g,
|
|
41
|
-
onTransform:
|
|
42
|
-
onPointsChange:
|
|
41
|
+
onTransform: qe,
|
|
42
|
+
onPointsChange: U,
|
|
43
43
|
actions: e = !0
|
|
44
|
-
} =
|
|
44
|
+
} = we, I = Ce({}), v = Ce({}), [V, Ae] = a(0), [Z, Ge] = a(0), [u, L] = a(1), [f, y] = a(0), [m, B] = a(0), [l, D] = a(0), [r, O] = a(0), [q, Je] = a(!1), [A, N] = a(!1), [G, Ke] = a(), [w, z] = a({
|
|
45
45
|
x: 0,
|
|
46
46
|
y: 0
|
|
47
|
-
}), [J, K, Q, _] =
|
|
47
|
+
}), [J, K, Q, _] = Ue, [d, k] = a(R), [ee, Qe] = a(1), [_e, te] = a(!1), [c, et] = a(typeof e != "boolean" ? e : e === !0 ? {} : null);
|
|
48
48
|
X(() => {
|
|
49
49
|
Qe(Math.round(u * 100) / 100);
|
|
50
50
|
}, [u]), X(() => {
|
|
51
|
-
|
|
51
|
+
k(R);
|
|
52
52
|
}, [R]), X(() => {
|
|
53
|
-
|
|
53
|
+
Ne = new ResizeObserver(oe), Ne.observe(v.current);
|
|
54
54
|
const t = (o) => (o.preventDefault(), !1);
|
|
55
55
|
return v.current.addEventListener("wheel", t), () => {
|
|
56
56
|
v.current.removeEventListener("wheel", t);
|
|
@@ -59,30 +59,30 @@ const Tt = dt((Se, Te) => {
|
|
|
59
59
|
const oe = () => {
|
|
60
60
|
if (!v.current)
|
|
61
61
|
return;
|
|
62
|
-
const t = v.current.clientWidth, o = v.current.clientHeight, n =
|
|
63
|
-
Ae(t), Ge(o), L(
|
|
64
|
-
},
|
|
65
|
-
if (
|
|
62
|
+
const t = v.current.clientWidth, o = v.current.clientHeight, n = I.current.naturalWidth, s = I.current.naturalHeight, p = t / n, Y = o / s, P = p < Y ? p : Y, rt = (t - n * P) / 2, ut = (o - s * P) / 2, ft = n * P, mt = s * P;
|
|
63
|
+
Ae(t), Ge(o), L(P), y(rt), B(ut), D(ft), O(mt), Je(!0), F && F(I.current);
|
|
64
|
+
}, T = () => {
|
|
65
|
+
if (!$ || u >= x)
|
|
66
66
|
return;
|
|
67
|
-
let t = u * (1 +
|
|
68
|
-
t >=
|
|
67
|
+
let t = u * (1 + S), o = S;
|
|
68
|
+
t >= x && (t = x, o = x / u - 1), y(f - l * (o / 2)), B(m - r * (o / 2)), D(l + l * o), O(r + r * o), L(t), H();
|
|
69
69
|
}, W = () => {
|
|
70
|
-
if (
|
|
70
|
+
if (!$ || u <= M)
|
|
71
71
|
return;
|
|
72
|
-
let t = u * (1 -
|
|
73
|
-
t <=
|
|
72
|
+
let t = u * (1 - S), o = S;
|
|
73
|
+
t <= M && (t = M, o = 1 - M / u), y(f - l * (-o / 2)), B(m - r * (-o / 2)), D(l + l * -o), O(r + r * -o), L(t), H();
|
|
74
74
|
};
|
|
75
|
-
gt(
|
|
76
|
-
zoomIn:
|
|
75
|
+
gt(ze, () => ({
|
|
76
|
+
zoomIn: T,
|
|
77
77
|
zoomOut: W
|
|
78
78
|
}));
|
|
79
|
-
const tt = (t) => (t.nativeEvent.deltaY < 0 ?
|
|
80
|
-
|
|
79
|
+
const tt = (t) => (t.nativeEvent.deltaY < 0 ? T() : W(), !1), ot = (t) => {
|
|
80
|
+
N(!0);
|
|
81
81
|
const {
|
|
82
82
|
pageX: o,
|
|
83
83
|
pageY: n
|
|
84
84
|
} = t;
|
|
85
|
-
|
|
85
|
+
z({
|
|
86
86
|
x: o,
|
|
87
87
|
y: n
|
|
88
88
|
});
|
|
@@ -92,31 +92,31 @@ const Tt = dt((Se, Te) => {
|
|
|
92
92
|
const {
|
|
93
93
|
pageX: o,
|
|
94
94
|
pageY: n
|
|
95
|
-
} = t, s = o -
|
|
96
|
-
|
|
95
|
+
} = t, s = o - w.x, p = n - w.y;
|
|
96
|
+
z({
|
|
97
97
|
x: o,
|
|
98
98
|
y: n
|
|
99
|
-
}), y(
|
|
99
|
+
}), y(f + s), B(m + p), H();
|
|
100
100
|
}, ne = () => {
|
|
101
|
-
|
|
101
|
+
N(!1);
|
|
102
102
|
};
|
|
103
103
|
window.onmouseup = () => {
|
|
104
|
-
|
|
104
|
+
N(!1);
|
|
105
105
|
};
|
|
106
106
|
const H = () => {
|
|
107
|
-
|
|
107
|
+
f < -l + _ && y(-l + _), m < -r + J && B(-r + J), f > V - K && y(V - K), m > Z - Q && B(Z - Q);
|
|
108
108
|
}, st = () => {
|
|
109
|
-
|
|
109
|
+
k(!d), g && g(!d);
|
|
110
110
|
}, it = (t) => {
|
|
111
111
|
const {
|
|
112
112
|
touches: o
|
|
113
113
|
} = t;
|
|
114
|
-
if (console.log("onTouchStart"), console.log(o),
|
|
114
|
+
if (console.log("onTouchStart"), console.log(o), N(!0), o.length < 2) {
|
|
115
115
|
const {
|
|
116
116
|
clientX: n,
|
|
117
117
|
clientY: s
|
|
118
118
|
} = o[0];
|
|
119
|
-
|
|
119
|
+
z({
|
|
120
120
|
x: n,
|
|
121
121
|
y: s
|
|
122
122
|
});
|
|
@@ -130,15 +130,15 @@ const Tt = dt((Se, Te) => {
|
|
|
130
130
|
clientY: n
|
|
131
131
|
} = t.touches[0];
|
|
132
132
|
if (t.touches.length < 2) {
|
|
133
|
-
const s = o -
|
|
134
|
-
|
|
133
|
+
const s = o - w.x, p = n - w.y;
|
|
134
|
+
z({
|
|
135
135
|
x: o,
|
|
136
136
|
y: n
|
|
137
|
-
}), y(
|
|
137
|
+
}), y(f + s), B(m + p), H();
|
|
138
138
|
} else {
|
|
139
139
|
console.log("onTouchMove"), console.log(t.touches);
|
|
140
|
-
const s = t.touches,
|
|
141
|
-
|
|
140
|
+
const s = t.touches, p = se(s[0], s[1]), Y = se(G[0], G[1]);
|
|
141
|
+
p > Y ? T() : W();
|
|
142
142
|
}
|
|
143
143
|
}, se = (t, o) => {
|
|
144
144
|
const n = o.pageX - t.pageX, s = o.pageY - t.pageY;
|
|
@@ -148,61 +148,61 @@ const Tt = dt((Se, Te) => {
|
|
|
148
148
|
et(typeof e != "boolean" ? e : e === !0 ? {} : null);
|
|
149
149
|
}, [e]);
|
|
150
150
|
const ct = () => {
|
|
151
|
-
|
|
151
|
+
k(!1), g && g(!1);
|
|
152
152
|
}, lt = () => {
|
|
153
153
|
te(!0);
|
|
154
154
|
};
|
|
155
|
-
return
|
|
155
|
+
return b("div", {
|
|
156
156
|
className: "image-map",
|
|
157
157
|
ref: v,
|
|
158
|
-
onMouseDown:
|
|
159
|
-
onMouseMove:
|
|
160
|
-
onMouseUp:
|
|
161
|
-
onWheel:
|
|
162
|
-
onTouchStart:
|
|
163
|
-
onTouchMove:
|
|
164
|
-
onTouchEnd:
|
|
165
|
-
children: [
|
|
158
|
+
onMouseDown: h ? ot : void 0,
|
|
159
|
+
onMouseMove: h ? nt : void 0,
|
|
160
|
+
onMouseUp: h ? ne : void 0,
|
|
161
|
+
onWheel: h ? tt : void 0,
|
|
162
|
+
onTouchStart: h ? it : void 0,
|
|
163
|
+
onTouchMove: h ? at : void 0,
|
|
164
|
+
onTouchEnd: h ? ne : void 0,
|
|
165
|
+
children: [i("img", {
|
|
166
166
|
className: "img",
|
|
167
167
|
style: {
|
|
168
168
|
position: "absolute",
|
|
169
|
-
left:
|
|
170
|
-
top:
|
|
169
|
+
left: f,
|
|
170
|
+
top: m,
|
|
171
171
|
width: l,
|
|
172
172
|
height: r
|
|
173
173
|
},
|
|
174
|
-
ref:
|
|
174
|
+
ref: I,
|
|
175
175
|
onLoad: oe,
|
|
176
|
-
src:
|
|
176
|
+
src: Te,
|
|
177
177
|
alt: ""
|
|
178
|
-
}),
|
|
178
|
+
}), q && (E == null ? void 0 : E.length) && i(pt, {
|
|
179
179
|
style: {
|
|
180
180
|
position: "absolute",
|
|
181
|
-
left:
|
|
182
|
-
top:
|
|
181
|
+
left: f,
|
|
182
|
+
top: m,
|
|
183
183
|
width: l,
|
|
184
184
|
height: r
|
|
185
185
|
},
|
|
186
186
|
passes: E,
|
|
187
187
|
scale: u,
|
|
188
188
|
activePassId: Oe,
|
|
189
|
-
passStyle:
|
|
190
|
-
activePassStyle:
|
|
191
|
-
}),
|
|
189
|
+
passStyle: $e,
|
|
190
|
+
activePassStyle: Fe
|
|
191
|
+
}), q && !!(C != null && C.length) && i(ht, {
|
|
192
192
|
style: {
|
|
193
193
|
position: "absolute",
|
|
194
|
-
left:
|
|
195
|
-
top:
|
|
194
|
+
left: f,
|
|
195
|
+
top: m,
|
|
196
196
|
width: l,
|
|
197
197
|
height: r,
|
|
198
198
|
overflow: "visible"
|
|
199
199
|
},
|
|
200
|
-
width:
|
|
201
|
-
height:
|
|
202
|
-
transform:
|
|
200
|
+
width: I.current.naturalWidth,
|
|
201
|
+
height: I.current.naturalHeight,
|
|
202
|
+
transform: Ze,
|
|
203
203
|
movable: d,
|
|
204
204
|
resizable: d,
|
|
205
|
-
points:
|
|
205
|
+
points: C,
|
|
206
206
|
scale: u,
|
|
207
207
|
pointSize: We,
|
|
208
208
|
direction: He,
|
|
@@ -210,37 +210,37 @@ const Tt = dt((Se, Te) => {
|
|
|
210
210
|
lineStyle: Xe,
|
|
211
211
|
pointStyle: Re,
|
|
212
212
|
directionStyle: Le,
|
|
213
|
-
keepRatio:
|
|
214
|
-
marks:
|
|
215
|
-
onPointClick:
|
|
216
|
-
onTransform:
|
|
213
|
+
keepRatio: Ve,
|
|
214
|
+
marks: je,
|
|
215
|
+
onPointClick: De,
|
|
216
|
+
onTransform: qe,
|
|
217
217
|
onPointsChange: (t) => {
|
|
218
|
-
|
|
218
|
+
U && U(t), k(!1), g && g(!1);
|
|
219
219
|
},
|
|
220
220
|
onCancelResize: () => {
|
|
221
|
-
|
|
221
|
+
k(!1), g && g(!1);
|
|
222
222
|
},
|
|
223
223
|
actions: e,
|
|
224
224
|
setIsSaved: te,
|
|
225
225
|
isSaved: _e
|
|
226
|
-
}),
|
|
226
|
+
}), j && b("div", {
|
|
227
227
|
className: "image-map-toolbar",
|
|
228
|
-
children: [
|
|
228
|
+
children: [i(Bt, {
|
|
229
229
|
className: "zoom-controller",
|
|
230
230
|
value: ee,
|
|
231
|
-
min:
|
|
232
|
-
max:
|
|
233
|
-
step:
|
|
231
|
+
min: M,
|
|
232
|
+
max: x,
|
|
233
|
+
step: S,
|
|
234
234
|
showText: !0,
|
|
235
235
|
onChange: (t) => {
|
|
236
|
-
ee > t ? W() :
|
|
236
|
+
ee > t ? W() : T();
|
|
237
237
|
}
|
|
238
|
-
}),
|
|
239
|
-
children: [
|
|
238
|
+
}), j && (d && e ? b(Pe, {
|
|
239
|
+
children: [i("div", {
|
|
240
240
|
className: "line"
|
|
241
|
-
}),
|
|
241
|
+
}), b("div", {
|
|
242
242
|
className: "editing-controller",
|
|
243
|
-
children: [
|
|
243
|
+
children: [i(Ee, {
|
|
244
244
|
children: typeof e != "boolean" && ((ie = e.cancelButton) == null ? void 0 : ie.children) || void 0,
|
|
245
245
|
name: typeof e != "boolean" && ((ae = e.cancelButton) == null ? void 0 : ae.text) || "退出编辑",
|
|
246
246
|
className: `editing-controller${d ? " active" : ""} ${typeof e != "boolean" && ((ce = e.cancelButton) == null ? void 0 : ce.className) || ""}`,
|
|
@@ -249,40 +249,40 @@ const Tt = dt((Se, Te) => {
|
|
|
249
249
|
} : (re = c == null ? void 0 : c.cancelButton) != null && re.confirm ? c.cancelButton.confirm : !1,
|
|
250
250
|
style: typeof e != "boolean" && ((ue = e.cancelButton) == null ? void 0 : ue.style) || void 0,
|
|
251
251
|
onConfirm: ct
|
|
252
|
-
}),
|
|
252
|
+
}), i(Ee, {
|
|
253
253
|
type: "primary",
|
|
254
|
-
children: typeof e != "boolean" && ((
|
|
254
|
+
children: typeof e != "boolean" && ((fe = e.okButton) == null ? void 0 : fe.children) || b("div", {
|
|
255
255
|
className: "save-detail",
|
|
256
|
-
children: [
|
|
256
|
+
children: [i(yt, {}), i("span", {
|
|
257
257
|
children: "保存"
|
|
258
258
|
})]
|
|
259
259
|
}),
|
|
260
|
-
name: typeof e != "boolean" && ((
|
|
260
|
+
name: typeof e != "boolean" && ((me = e.okButton) != null && me.confirm) ? ((de = e.okButton) == null ? void 0 : de.text) || "保存" : "确定",
|
|
261
261
|
className: `editing-controller${d ? " active" : ""} ${typeof e != "boolean" && ((ge = e.okButton) == null ? void 0 : ge.className) || ""}`,
|
|
262
|
-
confirm: ((
|
|
262
|
+
confirm: ((pe = c == null ? void 0 : c.okButton) == null ? void 0 : pe.confirm) === !0 ? {
|
|
263
263
|
text: "调整记录保存后,将改变当前巡检数据状态"
|
|
264
|
-
} : (
|
|
264
|
+
} : (he = c == null ? void 0 : c.okButton) != null && he.confirm ? c.okButton.confirm : !1,
|
|
265
265
|
style: typeof e != "boolean" && ((ve = e.okButton) == null ? void 0 : ve.style) || void 0,
|
|
266
266
|
onConfirm: lt
|
|
267
267
|
})]
|
|
268
268
|
})]
|
|
269
|
-
}) :
|
|
270
|
-
children: [
|
|
269
|
+
}) : b(Pe, {
|
|
270
|
+
children: [i("div", {
|
|
271
271
|
className: "line"
|
|
272
|
-
}),
|
|
272
|
+
}), i("div", {
|
|
273
273
|
className: "moveable-controller",
|
|
274
|
-
children:
|
|
274
|
+
children: i(vt, {
|
|
275
275
|
title: d ? typeof e != "boolean" && ((ye = e.editButton) == null ? void 0 : ye.exitTitleText) || "退出编辑" : typeof e != "boolean" && ((Be = e.editButton) == null ? void 0 : Be.titleText) || "调整轨迹",
|
|
276
276
|
className: `moveable-controller-btn${d ? " active" : ""} ${typeof e != "boolean" && ((be = e.editButton) == null ? void 0 : be.className) || ""}`,
|
|
277
|
-
style: typeof e != "boolean" && ((
|
|
277
|
+
style: typeof e != "boolean" && ((Ie = e.editButton) == null ? void 0 : Ie.style) || void 0,
|
|
278
278
|
onClick: st,
|
|
279
|
-
children: typeof e != "boolean" ? (
|
|
280
|
-
children: (
|
|
281
|
-
}) :
|
|
279
|
+
children: typeof e != "boolean" ? (Se = e.editButton) != null && Se.children ? (xe = e.editButton) == null ? void 0 : xe.children : (Me = e.editButton) != null && Me.text ? i("span", {
|
|
280
|
+
children: (ke = e.editButton) == null ? void 0 : ke.text
|
|
281
|
+
}) : b("div", {
|
|
282
282
|
className: "btn-change",
|
|
283
|
-
children: [
|
|
283
|
+
children: [i(bt, {
|
|
284
284
|
type: "icon-tiaozheng"
|
|
285
|
-
}),
|
|
285
|
+
}), i("span", {
|
|
286
286
|
children: "修改"
|
|
287
287
|
})]
|
|
288
288
|
}) : void 0
|
|
@@ -293,5 +293,5 @@ const Tt = dt((Se, Te) => {
|
|
|
293
293
|
});
|
|
294
294
|
});
|
|
295
295
|
export {
|
|
296
|
-
|
|
296
|
+
zt as ImageMap
|
|
297
297
|
};
|
|
@@ -7,23 +7,23 @@ const V = (t) => {
|
|
|
7
7
|
const {
|
|
8
8
|
children: b,
|
|
9
9
|
defaultPosition: g,
|
|
10
|
-
forElement:
|
|
11
|
-
placement:
|
|
12
|
-
curserPosition:
|
|
10
|
+
forElement: y,
|
|
11
|
+
placement: E = "right-bottom",
|
|
12
|
+
curserPosition: x,
|
|
13
13
|
className: h,
|
|
14
14
|
style: L
|
|
15
|
-
} = t, P = d(null), n = d(null), e =
|
|
15
|
+
} = t, P = d(null), n = d(null), e = y || document.body, o = O(E), i = S(o, (u = n.current) == null ? void 0 : u.getBoundingClientRect(), x), [$, s] = f(t.visible || !0), [r, N] = f(g || {
|
|
16
16
|
x: -2e3,
|
|
17
17
|
y: -2e3
|
|
18
18
|
});
|
|
19
|
-
p(() => (e.addEventListener("mouseenter",
|
|
20
|
-
e.removeEventListener("mouseenter",
|
|
19
|
+
p(() => (e.addEventListener("mouseenter", l), e.addEventListener("mousemove", c), e.addEventListener("mouseleave", m), () => {
|
|
20
|
+
e.removeEventListener("mouseenter", l), e.removeEventListener("mousemove", c), e.removeEventListener("mouseleave", m);
|
|
21
21
|
}), [e]), p(() => {
|
|
22
22
|
s(t.visible || !0);
|
|
23
23
|
}, [t.visible]);
|
|
24
|
-
const
|
|
24
|
+
const l = () => {
|
|
25
25
|
s(!0);
|
|
26
|
-
},
|
|
26
|
+
}, m = () => {
|
|
27
27
|
s(!1);
|
|
28
28
|
}, c = (v) => {
|
|
29
29
|
let R = T(v) + i.x;
|
|
@@ -33,7 +33,7 @@ const V = (t) => {
|
|
|
33
33
|
y: j
|
|
34
34
|
});
|
|
35
35
|
};
|
|
36
|
-
return
|
|
36
|
+
return a("div", {
|
|
37
37
|
className: `g-mouse-tip ${o.join(" ")}`,
|
|
38
38
|
ref: P,
|
|
39
39
|
style: {
|
|
@@ -41,7 +41,7 @@ const V = (t) => {
|
|
|
41
41
|
top: `${r.y}px`,
|
|
42
42
|
visibility: `${$ ? "visible" : "hidden"}`
|
|
43
43
|
},
|
|
44
|
-
children:
|
|
44
|
+
children: a("div", {
|
|
45
45
|
className: `g-mouse-tip-content ${h}`,
|
|
46
46
|
style: L,
|
|
47
47
|
ref: n,
|