costy-plus 1.1.2-0 → 1.1.4-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/src/EnlargeWaveView/index.vue_vue_type_script_lang.js +10 -8
- package/dist/es/src/MeasuringRuler/index.vue.d.ts +1 -1
- package/dist/es/src/MeasuringRuler/index.vue_vue_type_script_lang.js +321 -133
- package/dist/es/src/MeasuringRulerMore/index.vue.d.ts +1 -1
- package/dist/es/src/MeasuringRulerMore/index.vue_vue_type_script_lang.js +373 -182
- package/dist/lib/src/EnlargeWaveView/index.vue_vue_type_script_lang.js +1 -1
- package/dist/lib/src/MeasuringRuler/index.vue.d.ts +1 -1
- package/dist/lib/src/MeasuringRuler/index.vue_vue_type_script_lang.js +2 -2
- package/dist/lib/src/MeasuringRulerMore/index.vue.d.ts +1 -1
- package/dist/lib/src/MeasuringRulerMore/index.vue_vue_type_script_lang.js +2 -2
- package/package.json +1 -1
|
@@ -10,14 +10,15 @@ import "../../node_modules/.pnpm/vue-property-decorator@9.1.2_vue-class-componen
|
|
|
10
10
|
import { Button as a, Checkbox as m, Descriptions as c, DescriptionsItem as h } from "element-ui";
|
|
11
11
|
import u from "../BackgroundGrid/index2.js";
|
|
12
12
|
import f from "../MeasuringRuler/index2.js";
|
|
13
|
-
import
|
|
14
|
-
import v from "
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
import g from "../MeasuringRulerMore/index2.js";
|
|
14
|
+
import { init as v } from "zrender";
|
|
15
|
+
import x from "./medthod.js";
|
|
16
|
+
var w = Object.defineProperty, M = Object.getOwnPropertyDescriptor, W = (e, i, n, r) => {
|
|
17
|
+
for (var t = r > 1 ? void 0 : r ? M(i, n) : i, o = e.length - 1, s; o >= 0; o--)
|
|
17
18
|
(s = e[o]) && (t = (r ? s(i, n, t) : s(t)) || t);
|
|
18
|
-
return r && t &&
|
|
19
|
+
return r && t && w(i, n, t), t;
|
|
19
20
|
};
|
|
20
|
-
let p = class extends d(
|
|
21
|
+
let p = class extends d(x) {
|
|
21
22
|
mounted() {
|
|
22
23
|
this.init();
|
|
23
24
|
}
|
|
@@ -28,7 +29,7 @@ let p = class extends d(v) {
|
|
|
28
29
|
const e = document.getElementById(
|
|
29
30
|
`${this.prefixId}enlarge-wave-from-box`
|
|
30
31
|
);
|
|
31
|
-
this.sceneIns =
|
|
32
|
+
this.sceneIns = v(e, {
|
|
32
33
|
width: this.containerWH.width,
|
|
33
34
|
height: this.containerWH.height,
|
|
34
35
|
devicePixelRatio: 2
|
|
@@ -45,12 +46,13 @@ let p = class extends d(v) {
|
|
|
45
46
|
this.createLeadHead(), this.createLeadName(), this.createSensAndSpeed(), this.createWaveFrom(), this.drawWaveFrom(), this.drawMeasureLine(), this.calculatedValue(), this.electricAxisAnalyse(), this.processEnlargeAnalysis();
|
|
46
47
|
}
|
|
47
48
|
};
|
|
48
|
-
p =
|
|
49
|
+
p = W([
|
|
49
50
|
l({
|
|
50
51
|
name: "EnlargeWaveView",
|
|
51
52
|
components: {
|
|
52
53
|
MXBackgroundGrid: u,
|
|
53
54
|
MXMeasuringRuler: f,
|
|
55
|
+
MeasuringRulerMore: g,
|
|
54
56
|
[a.name]: a,
|
|
55
57
|
[m.name]: m,
|
|
56
58
|
[c.name]: c,
|
|
@@ -21,7 +21,7 @@ declare class MXMeasuringRuler extends Vue {
|
|
|
21
21
|
protected rectIns: Readonly<Rect | null>;
|
|
22
22
|
protected textIns: Readonly<Text | null>;
|
|
23
23
|
protected fontFamily: string;
|
|
24
|
-
/**
|
|
24
|
+
/** 左上,右上,右下,左下,上,右,下,左 */
|
|
25
25
|
protected circleList: readonly Circle[];
|
|
26
26
|
protected isMouseDown: Readonly<boolean>;
|
|
27
27
|
protected circleDragPos: Readonly<{
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import "./style/index.css";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
2
|
+
import X from "vue";
|
|
3
|
+
import O from "../../node_modules/.pnpm/vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-class-component/dist/vue-class-component.esm.js";
|
|
4
4
|
import "../../node_modules/.pnpm/vue-property-decorator@9.1.2_vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-property-decorator/lib/decorators/Emit.js";
|
|
5
|
-
import { Prop as
|
|
6
|
-
import { Text as
|
|
7
|
-
import { calcMs as
|
|
8
|
-
var
|
|
9
|
-
for (var
|
|
10
|
-
(
|
|
11
|
-
return
|
|
5
|
+
import { Prop as p } from "../../node_modules/.pnpm/vue-property-decorator@9.1.2_vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-property-decorator/lib/decorators/Prop.js";
|
|
6
|
+
import { Text as P, Group as F, Rect as u, Circle as Y, init as T } from "zrender";
|
|
7
|
+
import { calcMs as j, calcMV as S, calcBpm as $ } from "@costy-plus/utils";
|
|
8
|
+
var G = Object.defineProperty, W = Object.getOwnPropertyDescriptor, l = (t, e, s, h) => {
|
|
9
|
+
for (var c = h > 1 ? void 0 : h ? W(e, s) : e, a = t.length - 1, i; a >= 0; a--)
|
|
10
|
+
(i = t[a]) && (c = (h ? i(e, s, c) : i(c)) || c);
|
|
11
|
+
return h && c && G(e, s, c), c;
|
|
12
12
|
};
|
|
13
|
-
let
|
|
13
|
+
let o = class extends X {
|
|
14
14
|
constructor() {
|
|
15
15
|
super(...arguments), this.sceneIns = Object.freeze(null), this.measuringRulerGroup = Object.freeze(null), this.rectIns = Object.freeze(null), this.textIns = Object.freeze(null), this.fontFamily = Object.freeze("\u5FAE\u8F6F\u96C5\u9ED1"), this.circleList = Object.freeze([]), this.isMouseDown = Object.freeze(!1), this.circleDragPos = Object.freeze({
|
|
16
16
|
x: 0,
|
|
@@ -18,8 +18,8 @@ let a = class extends x {
|
|
|
18
18
|
});
|
|
19
19
|
}
|
|
20
20
|
destroyed() {
|
|
21
|
-
var
|
|
22
|
-
(
|
|
21
|
+
var t, e;
|
|
22
|
+
(t = this.measuringRulerGroup) == null || t.removeAll(), (e = this.sceneIns) == null || e.dispose();
|
|
23
23
|
}
|
|
24
24
|
created() {
|
|
25
25
|
this.initConfig();
|
|
@@ -28,7 +28,7 @@ let a = class extends x {
|
|
|
28
28
|
this.circleList = [], this.circleDragPos = {
|
|
29
29
|
x: 0,
|
|
30
30
|
y: 0
|
|
31
|
-
}, this.textIns = new
|
|
31
|
+
}, this.textIns = new P({
|
|
32
32
|
style: {
|
|
33
33
|
lineHeight: this.config.textFontSize + 4,
|
|
34
34
|
fontSize: this.config.textFontSize,
|
|
@@ -36,9 +36,9 @@ let a = class extends x {
|
|
|
36
36
|
fontFamily: this.fontFamily,
|
|
37
37
|
fontWeight: "bold"
|
|
38
38
|
}
|
|
39
|
-
}), this.measuringRulerGroup = new
|
|
39
|
+
}), this.measuringRulerGroup = new F({
|
|
40
40
|
name: "measuringRuler"
|
|
41
|
-
}), this.rectIns = new
|
|
41
|
+
}), this.rectIns = new u({
|
|
42
42
|
name: "rect",
|
|
43
43
|
style: {
|
|
44
44
|
stroke: this.config.stroke,
|
|
@@ -52,10 +52,24 @@ let a = class extends x {
|
|
|
52
52
|
cursor: "move",
|
|
53
53
|
draggable: !0
|
|
54
54
|
});
|
|
55
|
-
let
|
|
56
|
-
const
|
|
57
|
-
for (let s = 0; s <
|
|
58
|
-
|
|
55
|
+
let t;
|
|
56
|
+
const e = ["nw-resize", "ne-resize", "se-resize", "sw-resize", "n-resize", "e-resize", "s-resize", "w-resize"];
|
|
57
|
+
for (let s = 0; s < 8; s++)
|
|
58
|
+
s > 3 ? t = new u({
|
|
59
|
+
name: `${s}_circle`,
|
|
60
|
+
style: {
|
|
61
|
+
stroke: this.config.circleLinestroke,
|
|
62
|
+
lineWidth: this.config.circleLineW,
|
|
63
|
+
fill: "transparent"
|
|
64
|
+
},
|
|
65
|
+
shape: {
|
|
66
|
+
width: 12,
|
|
67
|
+
height: 12
|
|
68
|
+
},
|
|
69
|
+
cursor: e[s],
|
|
70
|
+
zlevel: 1,
|
|
71
|
+
draggable: !0
|
|
72
|
+
}) : t = new Y({
|
|
59
73
|
name: `${s}_circle`,
|
|
60
74
|
style: {
|
|
61
75
|
stroke: this.config.circleLinestroke,
|
|
@@ -65,12 +79,12 @@ let a = class extends x {
|
|
|
65
79
|
shape: {
|
|
66
80
|
r: 12
|
|
67
81
|
},
|
|
68
|
-
cursor:
|
|
82
|
+
cursor: e[s],
|
|
69
83
|
zlevel: 1,
|
|
70
84
|
draggable: !0
|
|
71
|
-
}),
|
|
85
|
+
}), t.hide(), this.measuringRulerGroup.add(t), this.circleList.push(t);
|
|
72
86
|
this.measuringRulerGroup.add(
|
|
73
|
-
new
|
|
87
|
+
new u({
|
|
74
88
|
name: "main-box",
|
|
75
89
|
style: {
|
|
76
90
|
fill: "transparent"
|
|
@@ -89,181 +103,355 @@ let a = class extends x {
|
|
|
89
103
|
this.init();
|
|
90
104
|
}
|
|
91
105
|
init() {
|
|
92
|
-
var
|
|
93
|
-
const
|
|
106
|
+
var e;
|
|
107
|
+
const t = document.getElementById(
|
|
94
108
|
`${this.prefixId}mx-measuring-ruler`
|
|
95
109
|
);
|
|
96
|
-
this.sceneIns =
|
|
110
|
+
this.sceneIns = T(t, {
|
|
97
111
|
width: this.width,
|
|
98
112
|
height: this.height,
|
|
99
113
|
devicePixelRatio: 2
|
|
100
|
-
}), (
|
|
114
|
+
}), (e = this.sceneIns) == null || e.add(this.measuringRulerGroup), this.sceneAddToEventListener(), this.rectAddToEventListener(), this.circleAddToEventListener();
|
|
101
115
|
}
|
|
102
116
|
calcText() {
|
|
103
|
-
var
|
|
104
|
-
const
|
|
105
|
-
((
|
|
117
|
+
var h, c, a, i, r, n, f, g;
|
|
118
|
+
const t = j(
|
|
119
|
+
((h = this.rectIns) == null ? void 0 : h.shape.width) || 0,
|
|
106
120
|
this.speedValue,
|
|
107
121
|
this.cellMg,
|
|
108
122
|
this.magnification
|
|
109
|
-
),
|
|
110
|
-
((
|
|
123
|
+
), e = S(
|
|
124
|
+
((c = this.rectIns) == null ? void 0 : c.shape.height) || 0,
|
|
111
125
|
this.sens,
|
|
112
126
|
this.magnification
|
|
113
|
-
), s =
|
|
114
|
-
(
|
|
127
|
+
), s = t !== 0 && $(t) || 0;
|
|
128
|
+
(g = this.textIns) == null || g.attr({
|
|
115
129
|
style: {
|
|
116
|
-
text: `${
|
|
130
|
+
text: `${t} ms
|
|
117
131
|
${s} bpm
|
|
118
|
-
${
|
|
119
|
-
x: (((
|
|
120
|
-
y: (((
|
|
132
|
+
${e} mV`,
|
|
133
|
+
x: (((a = this.rectIns) == null ? void 0 : a.x) || 0) + (((i = this.rectIns) == null ? void 0 : i.shape.x) || 0) + (((r = this.rectIns) == null ? void 0 : r.shape.width) || 0) + 20,
|
|
134
|
+
y: (((n = this.rectIns) == null ? void 0 : n.y) || 0) + (((f = this.rectIns) == null ? void 0 : f.shape.y) || 0)
|
|
121
135
|
}
|
|
122
136
|
});
|
|
123
137
|
}
|
|
124
|
-
circleHideOrShow(
|
|
125
|
-
this.circleList.forEach((
|
|
138
|
+
circleHideOrShow(t) {
|
|
139
|
+
this.circleList.forEach((e) => t ? e.show() : e.hide());
|
|
126
140
|
}
|
|
127
141
|
sceneAddToEventListener() {
|
|
128
|
-
var
|
|
129
|
-
const
|
|
130
|
-
|
|
142
|
+
var e, s, h, c;
|
|
143
|
+
const t = (a) => {
|
|
144
|
+
a.event.preventDefault(), this.$emit("notifyMeasuringRuler", {
|
|
131
145
|
name: "contextmenu"
|
|
132
146
|
});
|
|
133
147
|
};
|
|
134
|
-
(
|
|
135
|
-
var
|
|
136
|
-
(
|
|
148
|
+
(e = this.sceneIns) == null || e.on("contextmenu", t), (s = this.sceneIns) == null || s.on("mousedown", this.sceneMousedown), (h = this.sceneIns) == null || h.on("mousemove", this.scenemousemove), (c = this.sceneIns) == null || c.on("mouseup", this.scenemouseup), this.$once("hook:beforeDestroy", () => {
|
|
149
|
+
var a, i, r, n;
|
|
150
|
+
(a = this.sceneIns) == null || a.off("contextmenu", t), (i = this.sceneIns) == null || i.off("mousedown", this.sceneMousedown), (r = this.sceneIns) == null || r.off("mousemove", this.scenemousemove), (n = this.sceneIns) == null || n.off("mouseup", this.scenemouseup);
|
|
137
151
|
});
|
|
138
152
|
}
|
|
139
153
|
sceneRemoveEventListener() {
|
|
140
|
-
var
|
|
141
|
-
(
|
|
154
|
+
var t, e, s;
|
|
155
|
+
(t = this.sceneIns) == null || t.off("mousedown", this.sceneMousedown), (e = this.sceneIns) == null || e.off("mousemove", this.scenemousemove), (s = this.sceneIns) == null || s.off("mouseup", this.scenemouseup);
|
|
142
156
|
}
|
|
143
|
-
sceneMousedown(
|
|
144
|
-
var
|
|
145
|
-
this.isMouseDown = !0, (
|
|
157
|
+
sceneMousedown(t) {
|
|
158
|
+
var e;
|
|
159
|
+
this.isMouseDown = !0, (e = this.rectIns) == null || e.attr({
|
|
146
160
|
shape: {
|
|
147
|
-
x:
|
|
148
|
-
y:
|
|
161
|
+
x: t.offsetX,
|
|
162
|
+
y: t.offsetY
|
|
149
163
|
}
|
|
150
164
|
});
|
|
151
165
|
}
|
|
152
|
-
scenemousemove(
|
|
153
|
-
var
|
|
154
|
-
!this.isMouseDown || (
|
|
166
|
+
scenemousemove(t) {
|
|
167
|
+
var e;
|
|
168
|
+
!this.isMouseDown || (e = this.rectIns) == null || e.attr({
|
|
155
169
|
shape: {
|
|
156
|
-
width:
|
|
157
|
-
height:
|
|
170
|
+
width: t.offsetX - this.rectIns.shape.x,
|
|
171
|
+
height: t.offsetY - this.rectIns.shape.y
|
|
158
172
|
}
|
|
159
173
|
});
|
|
160
174
|
}
|
|
161
|
-
scenemouseup(
|
|
162
|
-
var
|
|
163
|
-
this.isMouseDown = !1, (
|
|
175
|
+
scenemouseup(t) {
|
|
176
|
+
var e, s, h, c, a, i, r, n, f, g, x, y, d, m, I, L, w, v, D, b, z, M, R, C, E;
|
|
177
|
+
this.isMouseDown = !1, (e = this.rectIns) == null || e.attr({
|
|
164
178
|
shape: {
|
|
165
|
-
width:
|
|
166
|
-
height:
|
|
179
|
+
width: t.offsetX - this.rectIns.shape.x,
|
|
180
|
+
height: t.offsetY - this.rectIns.shape.y
|
|
167
181
|
}
|
|
168
182
|
}), this.circleList[0].attr({
|
|
169
183
|
x: (s = this.rectIns) == null ? void 0 : s.shape.x,
|
|
170
|
-
y: (
|
|
184
|
+
y: (h = this.rectIns) == null ? void 0 : h.shape.y
|
|
171
185
|
}), this.circleList[1].attr({
|
|
172
|
-
x:
|
|
173
|
-
y: (
|
|
186
|
+
x: t.offsetX - (((c = this.rectIns) == null ? void 0 : c.shape.x) || 0) + (((a = this.rectIns) == null ? void 0 : a.shape.x) || 0),
|
|
187
|
+
y: (i = this.rectIns) == null ? void 0 : i.shape.y
|
|
174
188
|
}), this.circleList[2].attr({
|
|
175
|
-
x:
|
|
176
|
-
y:
|
|
189
|
+
x: t.offsetX - (((r = this.rectIns) == null ? void 0 : r.shape.x) || 0) + (((n = this.rectIns) == null ? void 0 : n.shape.x) || 0),
|
|
190
|
+
y: t.offsetY - (((f = this.rectIns) == null ? void 0 : f.shape.y) || 0) + (((g = this.rectIns) == null ? void 0 : g.shape.y) || 0)
|
|
177
191
|
}), this.circleList[3].attr({
|
|
178
|
-
x: (
|
|
179
|
-
y:
|
|
192
|
+
x: (x = this.rectIns) == null ? void 0 : x.shape.x,
|
|
193
|
+
y: t.offsetY - (((y = this.rectIns) == null ? void 0 : y.shape.y) || 0) + (((d = this.rectIns) == null ? void 0 : d.shape.y) || 0)
|
|
194
|
+
}), this.circleList[4].attr({
|
|
195
|
+
x: ((m = this.rectIns) == null ? void 0 : m.shape.x) + 12,
|
|
196
|
+
y: ((I = this.rectIns) == null ? void 0 : I.shape.y) - 12,
|
|
197
|
+
shape: {
|
|
198
|
+
width: t.offsetX - this.rectIns.shape.x - 24,
|
|
199
|
+
height: 24
|
|
200
|
+
}
|
|
201
|
+
}), this.circleList[5].attr({
|
|
202
|
+
x: t.offsetX - (((L = this.rectIns) == null ? void 0 : L.shape.x) || 0) + (((w = this.rectIns) == null ? void 0 : w.shape.x) || 0) - 12,
|
|
203
|
+
y: ((v = this.rectIns) == null ? void 0 : v.shape.y) + 12,
|
|
204
|
+
shape: {
|
|
205
|
+
width: 24,
|
|
206
|
+
height: t.offsetY - ((D = this.rectIns) == null ? void 0 : D.shape.y) - 24
|
|
207
|
+
}
|
|
208
|
+
}), this.circleList[6].attr({
|
|
209
|
+
x: ((b = this.rectIns) == null ? void 0 : b.shape.x) + 12,
|
|
210
|
+
y: t.offsetY - (((z = this.rectIns) == null ? void 0 : z.shape.y) || 0) + (((M = this.rectIns) == null ? void 0 : M.shape.y) || 0) - 12,
|
|
211
|
+
shape: {
|
|
212
|
+
width: t.offsetX - this.rectIns.shape.x - 24,
|
|
213
|
+
height: 24
|
|
214
|
+
}
|
|
215
|
+
}), this.circleList[7].attr({
|
|
216
|
+
x: ((R = this.rectIns) == null ? void 0 : R.shape.x) - 12,
|
|
217
|
+
y: ((C = this.rectIns) == null ? void 0 : C.shape.y) + 12,
|
|
218
|
+
shape: {
|
|
219
|
+
width: 24,
|
|
220
|
+
height: t.offsetY - ((E = this.rectIns) == null ? void 0 : E.shape.y) - 24
|
|
221
|
+
}
|
|
180
222
|
}), this.calcText(), this.circleHideOrShow(!0), this.sceneRemoveEventListener();
|
|
181
223
|
}
|
|
182
224
|
rectAddToEventListener() {
|
|
183
|
-
var
|
|
184
|
-
(
|
|
185
|
-
var
|
|
186
|
-
(
|
|
225
|
+
var t;
|
|
226
|
+
(t = this.rectIns) == null || t.on("drag", this.rectDrag), this.$once("hook:beforeDestroy", () => {
|
|
227
|
+
var e;
|
|
228
|
+
(e = this.rectIns) == null || e.on("drag", this.rectDrag);
|
|
187
229
|
});
|
|
188
230
|
}
|
|
189
|
-
rectDrag(
|
|
190
|
-
this.circleList.forEach((
|
|
191
|
-
|
|
231
|
+
rectDrag(t) {
|
|
232
|
+
this.circleList.forEach((e, s) => {
|
|
233
|
+
s > 3 ? e.attr({
|
|
192
234
|
shape: {
|
|
193
|
-
|
|
194
|
-
|
|
235
|
+
x: t.target.x,
|
|
236
|
+
y: t.target.y
|
|
237
|
+
}
|
|
238
|
+
}) : e.attr({
|
|
239
|
+
shape: {
|
|
240
|
+
cx: t.target.x,
|
|
241
|
+
cy: t.target.y
|
|
195
242
|
}
|
|
196
243
|
});
|
|
197
244
|
}), this.calcText(), console.log("rectDrag--\u8FD9\u91CC");
|
|
198
245
|
}
|
|
199
246
|
circleAddToEventListener() {
|
|
200
|
-
this.circleList.forEach((
|
|
201
|
-
|
|
247
|
+
this.circleList.forEach((t) => {
|
|
248
|
+
t.on("drag", this.circleDrag), t.on("dragstart", this.circleDragStart);
|
|
202
249
|
}), this.$once("hook:beforeDestroy", () => {
|
|
203
|
-
this.circleList.forEach((
|
|
204
|
-
|
|
250
|
+
this.circleList.forEach((t) => {
|
|
251
|
+
t.off("drag", this.circleDrag), t.off("dragstart", this.circleDragStart);
|
|
205
252
|
});
|
|
206
253
|
});
|
|
207
254
|
}
|
|
208
|
-
circleDragStart(
|
|
209
|
-
console.log("circleDragStart--\u8FD9\u91CC",
|
|
255
|
+
circleDragStart(t) {
|
|
256
|
+
console.log("circleDragStart--\u8FD9\u91CC", t), this.circleDragPos.x = t.offsetX, this.circleDragPos.y = t.offsetY;
|
|
210
257
|
}
|
|
211
|
-
circleDrag(
|
|
212
|
-
var
|
|
213
|
-
console.log("circleDrag--\u8FD9\u91CC",
|
|
214
|
-
const
|
|
215
|
-
if (isNaN(
|
|
258
|
+
circleDrag(t) {
|
|
259
|
+
var n;
|
|
260
|
+
console.log("circleDrag--\u8FD9\u91CC", t);
|
|
261
|
+
const e = parseInt(t.target.name);
|
|
262
|
+
if (isNaN(e))
|
|
216
263
|
return;
|
|
217
|
-
const s =
|
|
218
|
-
this.circleDragPos.x =
|
|
219
|
-
let
|
|
220
|
-
console.log("moveX", s,
|
|
221
|
-
y:
|
|
264
|
+
const s = t.offsetX - this.circleDragPos.x, h = t.offsetY - this.circleDragPos.y;
|
|
265
|
+
this.circleDragPos.x = t.offsetX, this.circleDragPos.y = t.offsetY;
|
|
266
|
+
let c = this.rectIns.shape.x, a = this.rectIns.shape.y, i = this.rectIns.shape.width, r = this.rectIns.shape.height;
|
|
267
|
+
console.log("moveX", s, h), e === 0 ? (c += s, a += h, s < 0 ? i += -s : i -= s, h < 0 ? r += -h : r -= h, this.circleList[1].attr({
|
|
268
|
+
y: t.target.y
|
|
222
269
|
}), this.circleList[3].attr({
|
|
223
|
-
x:
|
|
224
|
-
})
|
|
225
|
-
|
|
270
|
+
x: t.target.x
|
|
271
|
+
}), this.circleList[4].attr({
|
|
272
|
+
x: t.target.x + 12,
|
|
273
|
+
y: t.target.y - 12,
|
|
274
|
+
shape: {
|
|
275
|
+
width: i - 24
|
|
276
|
+
}
|
|
277
|
+
}), this.circleList[7].attr({
|
|
278
|
+
x: t.target.x - 12,
|
|
279
|
+
y: t.target.y + 12,
|
|
280
|
+
shape: {
|
|
281
|
+
height: r - 24
|
|
282
|
+
}
|
|
283
|
+
}), this.circleList[5].attr({
|
|
284
|
+
y: t.target.y + 12,
|
|
285
|
+
shape: {
|
|
286
|
+
height: r - 24
|
|
287
|
+
}
|
|
288
|
+
}), this.circleList[6].attr({
|
|
289
|
+
x: t.target.x + 12,
|
|
290
|
+
shape: {
|
|
291
|
+
width: i - 24
|
|
292
|
+
}
|
|
293
|
+
})) : e === 1 ? (a += h, i += s, h < 0 ? r += -h : r -= h, this.circleList[0].attr({
|
|
294
|
+
y: t.target.y
|
|
226
295
|
}), this.circleList[2].attr({
|
|
227
|
-
x:
|
|
228
|
-
})
|
|
229
|
-
|
|
296
|
+
x: t.target.x
|
|
297
|
+
}), this.circleList[4].attr({
|
|
298
|
+
x: t.target.x - i + 12,
|
|
299
|
+
y: t.target.y - 12,
|
|
300
|
+
shape: {
|
|
301
|
+
width: i - 24
|
|
302
|
+
}
|
|
303
|
+
}), this.circleList[5].attr({
|
|
304
|
+
x: t.target.x - 12,
|
|
305
|
+
y: t.target.y + 12,
|
|
306
|
+
shape: {
|
|
307
|
+
height: r - 24
|
|
308
|
+
}
|
|
309
|
+
}), this.circleList[6].attr({
|
|
310
|
+
shape: {
|
|
311
|
+
width: i - 24
|
|
312
|
+
}
|
|
313
|
+
}), this.circleList[7].attr({
|
|
314
|
+
y: t.target.y + 12,
|
|
315
|
+
shape: {
|
|
316
|
+
height: r - 24
|
|
317
|
+
}
|
|
318
|
+
})) : e === 2 ? (i += s, r += h, this.circleList[3].attr({
|
|
319
|
+
y: t.target.y
|
|
230
320
|
}), this.circleList[1].attr({
|
|
231
|
-
x:
|
|
232
|
-
})
|
|
233
|
-
|
|
321
|
+
x: t.target.x
|
|
322
|
+
}), this.circleList[5].attr({
|
|
323
|
+
x: t.target.x - 12,
|
|
324
|
+
shape: {
|
|
325
|
+
height: r - 24
|
|
326
|
+
}
|
|
327
|
+
}), this.circleList[6].attr({
|
|
328
|
+
y: t.target.y - 12,
|
|
329
|
+
shape: {
|
|
330
|
+
width: i - 24
|
|
331
|
+
}
|
|
332
|
+
}), this.circleList[4].attr({
|
|
333
|
+
shape: {
|
|
334
|
+
width: i - 24
|
|
335
|
+
}
|
|
336
|
+
}), this.circleList[7].attr({
|
|
337
|
+
shape: {
|
|
338
|
+
height: r - 24
|
|
339
|
+
}
|
|
340
|
+
})) : e === 3 ? (c += s, s < 0 ? i += -s : i -= s, r += h, this.circleList[2].attr({
|
|
341
|
+
y: t.target.y
|
|
234
342
|
}), this.circleList[0].attr({
|
|
235
|
-
x:
|
|
236
|
-
})
|
|
343
|
+
x: t.target.x
|
|
344
|
+
}), this.circleList[6].attr({
|
|
345
|
+
x: t.target.x + 12,
|
|
346
|
+
y: t.target.y - 12,
|
|
347
|
+
shape: {
|
|
348
|
+
width: i - 24
|
|
349
|
+
}
|
|
350
|
+
}), this.circleList[7].attr({
|
|
351
|
+
x: t.target.x - 12,
|
|
352
|
+
shape: {
|
|
353
|
+
height: r - 24
|
|
354
|
+
}
|
|
355
|
+
}), this.circleList[4].attr({
|
|
356
|
+
x: t.target.x + 12,
|
|
357
|
+
shape: {
|
|
358
|
+
width: i - 24
|
|
359
|
+
}
|
|
360
|
+
}), this.circleList[5].attr({
|
|
361
|
+
shape: {
|
|
362
|
+
height: r - 24
|
|
363
|
+
}
|
|
364
|
+
})) : e === 4 ? (a += h, h < 0 ? r += -h : r -= h, this.circleList[0].attr({
|
|
365
|
+
y: t.target.y + 12
|
|
366
|
+
}), this.circleList[1].attr({
|
|
367
|
+
y: t.target.y + 12
|
|
368
|
+
}), this.circleList[5].attr({
|
|
369
|
+
y: t.target.y + 24,
|
|
370
|
+
shape: {
|
|
371
|
+
height: r - 24
|
|
372
|
+
}
|
|
373
|
+
}), this.circleList[7].attr({
|
|
374
|
+
y: t.target.y + 24,
|
|
375
|
+
shape: {
|
|
376
|
+
height: r - 24
|
|
377
|
+
}
|
|
378
|
+
}), this.circleList[4].attr({
|
|
379
|
+
x: c + 12
|
|
380
|
+
})) : e === 5 ? (i += s, this.circleList[1].attr({
|
|
381
|
+
x: t.target.x + 12
|
|
382
|
+
}), this.circleList[2].attr({
|
|
383
|
+
x: t.target.x + 12
|
|
384
|
+
}), this.circleList[4].attr({
|
|
385
|
+
shape: {
|
|
386
|
+
width: i - 24
|
|
387
|
+
}
|
|
388
|
+
}), this.circleList[6].attr({
|
|
389
|
+
shape: {
|
|
390
|
+
width: i - 24
|
|
391
|
+
}
|
|
392
|
+
}), this.circleList[5].attr({
|
|
393
|
+
y: a + 12
|
|
394
|
+
})) : e === 6 ? (r += h, this.circleList[2].attr({
|
|
395
|
+
y: t.target.y + 12
|
|
396
|
+
}), this.circleList[3].attr({
|
|
397
|
+
y: t.target.y + 12
|
|
398
|
+
}), this.circleList[5].attr({
|
|
399
|
+
shape: {
|
|
400
|
+
height: r - 24
|
|
401
|
+
}
|
|
402
|
+
}), this.circleList[7].attr({
|
|
403
|
+
shape: {
|
|
404
|
+
height: r - 24
|
|
405
|
+
}
|
|
406
|
+
}), this.circleList[6].attr({
|
|
407
|
+
x: c + 12
|
|
408
|
+
})) : e === 7 && (c += s, s < 0 ? i += -s : i -= s, this.circleList[0].attr({
|
|
409
|
+
x: t.target.x + 12
|
|
410
|
+
}), this.circleList[3].attr({
|
|
411
|
+
x: t.target.x + 12
|
|
412
|
+
}), this.circleList[4].attr({
|
|
413
|
+
x: t.target.x + 24,
|
|
414
|
+
shape: {
|
|
415
|
+
width: i - 24
|
|
416
|
+
}
|
|
417
|
+
}), this.circleList[6].attr({
|
|
418
|
+
x: t.target.x + 24,
|
|
419
|
+
shape: {
|
|
420
|
+
width: i - 24
|
|
421
|
+
}
|
|
422
|
+
}), this.circleList[7].attr({
|
|
423
|
+
y: a + 12
|
|
424
|
+
})), (n = this.rectIns) == null || n.attr({
|
|
237
425
|
shape: {
|
|
238
|
-
x:
|
|
239
|
-
y:
|
|
240
|
-
width:
|
|
241
|
-
height:
|
|
426
|
+
x: c,
|
|
427
|
+
y: a,
|
|
428
|
+
width: i,
|
|
429
|
+
height: r
|
|
242
430
|
}
|
|
243
431
|
}), this.calcText();
|
|
244
432
|
}
|
|
245
433
|
};
|
|
246
434
|
l([
|
|
247
|
-
|
|
435
|
+
p({
|
|
248
436
|
default: () => ""
|
|
249
437
|
})
|
|
250
|
-
],
|
|
438
|
+
], o.prototype, "prefixId", 2);
|
|
251
439
|
l([
|
|
252
|
-
|
|
440
|
+
p({
|
|
253
441
|
required: !0,
|
|
254
442
|
type: Number,
|
|
255
|
-
validator: (
|
|
443
|
+
validator: (t) => typeof t == "number"
|
|
256
444
|
})
|
|
257
|
-
],
|
|
445
|
+
], o.prototype, "width", 2);
|
|
258
446
|
l([
|
|
259
|
-
|
|
447
|
+
p({
|
|
260
448
|
required: !0,
|
|
261
449
|
type: Number,
|
|
262
|
-
validator: (
|
|
450
|
+
validator: (t) => typeof t == "number"
|
|
263
451
|
})
|
|
264
|
-
],
|
|
452
|
+
], o.prototype, "height", 2);
|
|
265
453
|
l([
|
|
266
|
-
|
|
454
|
+
p({
|
|
267
455
|
default: () => ({
|
|
268
456
|
lineW: 1,
|
|
269
457
|
stroke: "#00C800",
|
|
@@ -273,35 +461,35 @@ l([
|
|
|
273
461
|
textFontSize: 12
|
|
274
462
|
})
|
|
275
463
|
})
|
|
276
|
-
],
|
|
464
|
+
], o.prototype, "config", 2);
|
|
277
465
|
l([
|
|
278
|
-
|
|
466
|
+
p({
|
|
279
467
|
required: !0
|
|
280
468
|
})
|
|
281
|
-
],
|
|
469
|
+
], o.prototype, "speedValue", 2);
|
|
282
470
|
l([
|
|
283
|
-
|
|
471
|
+
p({
|
|
284
472
|
required: !0
|
|
285
473
|
})
|
|
286
|
-
],
|
|
474
|
+
], o.prototype, "cellMg", 2);
|
|
287
475
|
l([
|
|
288
|
-
|
|
476
|
+
p({
|
|
289
477
|
default: 1
|
|
290
478
|
})
|
|
291
|
-
],
|
|
479
|
+
], o.prototype, "magnification", 2);
|
|
292
480
|
l([
|
|
293
|
-
|
|
481
|
+
p({
|
|
294
482
|
default: 1
|
|
295
483
|
})
|
|
296
|
-
],
|
|
484
|
+
], o.prototype, "sens", 2);
|
|
297
485
|
l([
|
|
298
|
-
|
|
299
|
-
],
|
|
300
|
-
|
|
301
|
-
|
|
486
|
+
p({ default: () => "" })
|
|
487
|
+
], o.prototype, "className", 2);
|
|
488
|
+
o = l([
|
|
489
|
+
O({
|
|
302
490
|
name: "MXMeasuringRuler"
|
|
303
491
|
})
|
|
304
|
-
],
|
|
492
|
+
], o);
|
|
305
493
|
export {
|
|
306
|
-
|
|
494
|
+
o as default
|
|
307
495
|
};
|