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.
@@ -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 { init as g } from "zrender";
14
- import v from "./medthod.js";
15
- var x = Object.defineProperty, w = Object.getOwnPropertyDescriptor, M = (e, i, n, r) => {
16
- for (var t = r > 1 ? void 0 : r ? w(i, n) : i, o = e.length - 1, s; o >= 0; o--)
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 && x(i, n, t), t;
19
+ return r && t && w(i, n, t), t;
19
20
  };
20
- let p = class extends d(v) {
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 = g(e, {
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 = M([
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 x from "vue";
3
- import I 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";
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 u } 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 v, Group as w, Rect as y, Circle as D, init as L } from "zrender";
7
- import { calcMs as b, calcMV as z, calcBpm as M } from "@costy-plus/utils";
8
- var R = Object.defineProperty, C = Object.getOwnPropertyDescriptor, l = (e, t, s, i) => {
9
- for (var r = i > 1 ? void 0 : i ? C(t, s) : t, o = e.length - 1, n; o >= 0; o--)
10
- (n = e[o]) && (r = (i ? n(t, s, r) : n(r)) || r);
11
- return i && r && R(t, s, r), r;
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 a = class extends x {
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 e, t;
22
- (e = this.measuringRulerGroup) == null || e.removeAll(), (t = this.sceneIns) == null || t.dispose();
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 v({
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 w({
39
+ }), this.measuringRulerGroup = new F({
40
40
  name: "measuringRuler"
41
- }), this.rectIns = new y({
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 e;
56
- const t = ["nw-resize", "ne-resize", "se-resize", "sw-resize"];
57
- for (let s = 0; s < 4; s++)
58
- e = new D({
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: t[s],
82
+ cursor: e[s],
69
83
  zlevel: 1,
70
84
  draggable: !0
71
- }), e.hide(), this.measuringRulerGroup.add(e), this.circleList.push(e);
85
+ }), t.hide(), this.measuringRulerGroup.add(t), this.circleList.push(t);
72
86
  this.measuringRulerGroup.add(
73
- new y({
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 t;
93
- const e = document.getElementById(
106
+ var e;
107
+ const t = document.getElementById(
94
108
  `${this.prefixId}mx-measuring-ruler`
95
109
  );
96
- this.sceneIns = L(e, {
110
+ this.sceneIns = T(t, {
97
111
  width: this.width,
98
112
  height: this.height,
99
113
  devicePixelRatio: 2
100
- }), (t = this.sceneIns) == null || t.add(this.measuringRulerGroup), this.sceneAddToEventListener(), this.rectAddToEventListener(), this.circleAddToEventListener();
114
+ }), (e = this.sceneIns) == null || e.add(this.measuringRulerGroup), this.sceneAddToEventListener(), this.rectAddToEventListener(), this.circleAddToEventListener();
101
115
  }
102
116
  calcText() {
103
- var i, r, o, n, c, h, f, p;
104
- const e = b(
105
- ((i = this.rectIns) == null ? void 0 : i.shape.width) || 0,
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
- ), t = z(
110
- ((r = this.rectIns) == null ? void 0 : r.shape.height) || 0,
123
+ ), e = S(
124
+ ((c = this.rectIns) == null ? void 0 : c.shape.height) || 0,
111
125
  this.sens,
112
126
  this.magnification
113
- ), s = e !== 0 && M(e) || 0;
114
- (p = this.textIns) == null || p.attr({
127
+ ), s = t !== 0 && $(t) || 0;
128
+ (g = this.textIns) == null || g.attr({
115
129
  style: {
116
- text: `${e} ms
130
+ text: `${t} ms
117
131
  ${s} bpm
118
- ${t} mV`,
119
- x: (((o = this.rectIns) == null ? void 0 : o.x) || 0) + (((n = this.rectIns) == null ? void 0 : n.shape.x) || 0) + (((c = this.rectIns) == null ? void 0 : c.shape.width) || 0) + 20,
120
- y: (((h = this.rectIns) == null ? void 0 : h.y) || 0) + (((f = this.rectIns) == null ? void 0 : f.shape.y) || 0)
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(e) {
125
- this.circleList.forEach((t) => e ? t.show() : t.hide());
138
+ circleHideOrShow(t) {
139
+ this.circleList.forEach((e) => t ? e.show() : e.hide());
126
140
  }
127
141
  sceneAddToEventListener() {
128
- var t, s, i, r;
129
- const e = (o) => {
130
- o.event.preventDefault(), this.$emit("notifyMeasuringRuler", {
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
- (t = this.sceneIns) == null || t.on("contextmenu", e), (s = this.sceneIns) == null || s.on("mousedown", this.sceneMousedown), (i = this.sceneIns) == null || i.on("mousemove", this.scenemousemove), (r = this.sceneIns) == null || r.on("mouseup", this.scenemouseup), this.$once("hook:beforeDestroy", () => {
135
- var o, n, c, h;
136
- (o = this.sceneIns) == null || o.off("contextmenu", e), (n = this.sceneIns) == null || n.off("mousedown", this.sceneMousedown), (c = this.sceneIns) == null || c.off("mousemove", this.scenemousemove), (h = this.sceneIns) == null || h.off("mouseup", this.scenemouseup);
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 e, t, s;
141
- (e = this.sceneIns) == null || e.off("mousedown", this.sceneMousedown), (t = this.sceneIns) == null || t.off("mousemove", this.scenemousemove), (s = this.sceneIns) == null || s.off("mouseup", this.scenemouseup);
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(e) {
144
- var t;
145
- this.isMouseDown = !0, (t = this.rectIns) == null || t.attr({
157
+ sceneMousedown(t) {
158
+ var e;
159
+ this.isMouseDown = !0, (e = this.rectIns) == null || e.attr({
146
160
  shape: {
147
- x: e.offsetX,
148
- y: e.offsetY
161
+ x: t.offsetX,
162
+ y: t.offsetY
149
163
  }
150
164
  });
151
165
  }
152
- scenemousemove(e) {
153
- var t;
154
- !this.isMouseDown || (t = this.rectIns) == null || t.attr({
166
+ scenemousemove(t) {
167
+ var e;
168
+ !this.isMouseDown || (e = this.rectIns) == null || e.attr({
155
169
  shape: {
156
- width: e.offsetX - this.rectIns.shape.x,
157
- height: e.offsetY - this.rectIns.shape.y
170
+ width: t.offsetX - this.rectIns.shape.x,
171
+ height: t.offsetY - this.rectIns.shape.y
158
172
  }
159
173
  });
160
174
  }
161
- scenemouseup(e) {
162
- var t, s, i, r, o, n, c, h, f, p, m, g, d;
163
- this.isMouseDown = !1, (t = this.rectIns) == null || t.attr({
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: e.offsetX - this.rectIns.shape.x,
166
- height: e.offsetY - this.rectIns.shape.y
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: (i = this.rectIns) == null ? void 0 : i.shape.y
184
+ y: (h = this.rectIns) == null ? void 0 : h.shape.y
171
185
  }), this.circleList[1].attr({
172
- x: e.offsetX - (((r = this.rectIns) == null ? void 0 : r.shape.x) || 0) + (((o = this.rectIns) == null ? void 0 : o.shape.x) || 0),
173
- y: (n = this.rectIns) == null ? void 0 : n.shape.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: e.offsetX - (((c = this.rectIns) == null ? void 0 : c.shape.x) || 0) + (((h = this.rectIns) == null ? void 0 : h.shape.x) || 0),
176
- y: e.offsetY - (((f = this.rectIns) == null ? void 0 : f.shape.y) || 0) + (((p = this.rectIns) == null ? void 0 : p.shape.y) || 0)
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: (m = this.rectIns) == null ? void 0 : m.shape.x,
179
- y: e.offsetY - (((g = this.rectIns) == null ? void 0 : g.shape.y) || 0) + (((d = this.rectIns) == null ? void 0 : d.shape.y) || 0)
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 e;
184
- (e = this.rectIns) == null || e.on("drag", this.rectDrag), this.$once("hook:beforeDestroy", () => {
185
- var t;
186
- (t = this.rectIns) == null || t.on("drag", this.rectDrag);
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(e) {
190
- this.circleList.forEach((t) => {
191
- t.attr({
231
+ rectDrag(t) {
232
+ this.circleList.forEach((e, s) => {
233
+ s > 3 ? e.attr({
192
234
  shape: {
193
- cx: e.target.x,
194
- cy: e.target.y
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((e) => {
201
- e.on("drag", this.circleDrag), e.on("dragstart", this.circleDragStart);
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((e) => {
204
- e.off("drag", this.circleDrag), e.off("dragstart", this.circleDragStart);
250
+ this.circleList.forEach((t) => {
251
+ t.off("drag", this.circleDrag), t.off("dragstart", this.circleDragStart);
205
252
  });
206
253
  });
207
254
  }
208
- circleDragStart(e) {
209
- console.log("circleDragStart--\u8FD9\u91CC", e), this.circleDragPos.x = e.offsetX, this.circleDragPos.y = e.offsetY;
255
+ circleDragStart(t) {
256
+ console.log("circleDragStart--\u8FD9\u91CC", t), this.circleDragPos.x = t.offsetX, this.circleDragPos.y = t.offsetY;
210
257
  }
211
- circleDrag(e) {
212
- var h;
213
- console.log("circleDrag--\u8FD9\u91CC", e);
214
- const t = parseInt(e.target.name);
215
- if (isNaN(t))
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 = e.offsetX - this.circleDragPos.x, i = e.offsetY - this.circleDragPos.y;
218
- this.circleDragPos.x = e.offsetX, this.circleDragPos.y = e.offsetY;
219
- let r = this.rectIns.shape.x, o = this.rectIns.shape.y, n = this.rectIns.shape.width, c = this.rectIns.shape.height;
220
- console.log("moveX", s, i), t === 0 ? (r += s, o += i, s < 0 ? n += -s : n -= s, i < 0 ? c += -i : c -= i, this.circleList[1].attr({
221
- y: e.target.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: e.target.x
224
- })) : t === 1 ? (o += i, n += s, i < 0 ? c += -i : c -= i, this.circleList[0].attr({
225
- y: e.target.y
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: e.target.x
228
- })) : t === 2 ? (n += s, c += i, this.circleList[3].attr({
229
- y: e.target.y
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: e.target.x
232
- })) : t === 3 && (r += s, s < 0 ? n += -s : n -= s, c += i, this.circleList[2].attr({
233
- y: e.target.y
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: e.target.x
236
- })), (h = this.rectIns) == null || h.attr({
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: r,
239
- y: o,
240
- width: n,
241
- height: c
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
- u({
435
+ p({
248
436
  default: () => ""
249
437
  })
250
- ], a.prototype, "prefixId", 2);
438
+ ], o.prototype, "prefixId", 2);
251
439
  l([
252
- u({
440
+ p({
253
441
  required: !0,
254
442
  type: Number,
255
- validator: (e) => typeof e == "number"
443
+ validator: (t) => typeof t == "number"
256
444
  })
257
- ], a.prototype, "width", 2);
445
+ ], o.prototype, "width", 2);
258
446
  l([
259
- u({
447
+ p({
260
448
  required: !0,
261
449
  type: Number,
262
- validator: (e) => typeof e == "number"
450
+ validator: (t) => typeof t == "number"
263
451
  })
264
- ], a.prototype, "height", 2);
452
+ ], o.prototype, "height", 2);
265
453
  l([
266
- u({
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
- ], a.prototype, "config", 2);
464
+ ], o.prototype, "config", 2);
277
465
  l([
278
- u({
466
+ p({
279
467
  required: !0
280
468
  })
281
- ], a.prototype, "speedValue", 2);
469
+ ], o.prototype, "speedValue", 2);
282
470
  l([
283
- u({
471
+ p({
284
472
  required: !0
285
473
  })
286
- ], a.prototype, "cellMg", 2);
474
+ ], o.prototype, "cellMg", 2);
287
475
  l([
288
- u({
476
+ p({
289
477
  default: 1
290
478
  })
291
- ], a.prototype, "magnification", 2);
479
+ ], o.prototype, "magnification", 2);
292
480
  l([
293
- u({
481
+ p({
294
482
  default: 1
295
483
  })
296
- ], a.prototype, "sens", 2);
484
+ ], o.prototype, "sens", 2);
297
485
  l([
298
- u({ default: () => "" })
299
- ], a.prototype, "className", 2);
300
- a = l([
301
- I({
486
+ p({ default: () => "" })
487
+ ], o.prototype, "className", 2);
488
+ o = l([
489
+ O({
302
490
  name: "MXMeasuringRuler"
303
491
  })
304
- ], a);
492
+ ], o);
305
493
  export {
306
- a as default
494
+ o as default
307
495
  };
@@ -4,7 +4,7 @@ import { MXMeasuringRulerConfig } from '../../types/MeasuringRuler';
4
4
  interface RectBox {
5
5
  react: Rect | null;
6
6
  text: Text | null;
7
- /** 左上,右上,右下,左下 */
7
+ /** 左上,右上,右下,左下,上,右,下,左 */
8
8
  circleList: Circle[];
9
9
  circleDragPos: {
10
10
  x: number;