costy-plus 1.1.47-0 → 1.1.49-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.
@@ -2,6 +2,7 @@ import MethodsMinix from './method';
2
2
  declare const CommonWaveForm_base: import("vue-class-component/lib/declarations").VueClass<MethodsMinix>;
3
3
  declare class CommonWaveForm extends CommonWaveForm_base {
4
4
  protected repaintTimer: ReturnType<typeof setTimeout> | null;
5
+ protected refreshFrame: number | null;
5
6
  protected watchVuescrollConfig(): void;
6
7
  protected watchAnalyseValues(): void;
7
8
  protected watchsingleModeConfig(): void;
@@ -1,25 +1,25 @@
1
1
  import "./style/index.css";
2
2
  import "vue";
3
- import l, { mixins as c } 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";
3
+ import p, { mixins as m } 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 { Watch as r } 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/Watch.js";
6
- import d from "../../node_modules/.pnpm/vuescroll@4.17.5_vue@2.7.16/node_modules/vuescroll/dist/vuescroll-native.js";
7
- import m from "../MeasuringRuler/index2.js";
5
+ import { Watch as i } 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/Watch.js";
6
+ import c from "../../node_modules/.pnpm/vuescroll@4.17.5_vue@2.7.16/node_modules/vuescroll/dist/vuescroll-native.js";
7
+ import d from "../MeasuringRuler/index2.js";
8
8
  import u from "../MagnifierWave/index.js";
9
9
  import f from "../ParallelRuler/index2.js";
10
10
  import g from "../BackgroundGrid/index2.js";
11
11
  import w from "./method.js";
12
- var v = Object.defineProperty, C = Object.getOwnPropertyDescriptor, i = (e, a, n, s) => {
13
- for (var o = s > 1 ? void 0 : s ? C(a, n) : a, h = e.length - 1, p; h >= 0; h--)
14
- (p = e[h]) && (o = (s ? p(a, n, o) : p(o)) || o);
12
+ var v = Object.defineProperty, C = Object.getOwnPropertyDescriptor, r = (e, a, n, s) => {
13
+ for (var o = s > 1 ? void 0 : s ? C(a, n) : a, h = e.length - 1, l; h >= 0; h--)
14
+ (l = e[h]) && (o = (s ? l(a, n, o) : l(o)) || o);
15
15
  return s && o && v(a, n, o), o;
16
16
  };
17
- let t = class extends c(w) {
17
+ let t = class extends m(w) {
18
18
  constructor() {
19
- super(...arguments), this.repaintTimer = null;
19
+ super(...arguments), this.repaintTimer = null, this.refreshFrame = null;
20
20
  }
21
21
  watchVuescrollConfig() {
22
- this.repaint();
22
+ this.repaint(), this.$nextTick(() => this.bindScrollEnd());
23
23
  }
24
24
  watchAnalyseValues() {
25
25
  this.nearestHeartInfo = {
@@ -34,7 +34,9 @@ let t = class extends c(w) {
34
34
  this.repaint();
35
35
  }
36
36
  watchWaveDataVersion() {
37
- this.refreshVisibleWaveData();
37
+ this.refreshFrame === null && (this.refreshFrame = requestAnimationFrame(() => {
38
+ this.refreshFrame = null, this.refreshVisibleWaveData();
39
+ }));
38
40
  }
39
41
  watchLeadHeadConfig() {
40
42
  var e, a;
@@ -57,7 +59,7 @@ let t = class extends c(w) {
57
59
  this.registPostStart();
58
60
  }
59
61
  destroyed() {
60
- this.repaintTimer && clearTimeout(this.repaintTimer), this.repaintTimer = null;
62
+ this.repaintTimer && clearTimeout(this.repaintTimer), this.repaintTimer = null, this.refreshFrame !== null && cancelAnimationFrame(this.refreshFrame), this.refreshFrame = null;
61
63
  }
62
64
  repaint(e = !0) {
63
65
  if (!e) {
@@ -76,49 +78,49 @@ let t = class extends c(w) {
76
78
  this.initCreatedConfig();
77
79
  }
78
80
  mounted() {
79
- this.init();
81
+ this.init(), this.$nextTick(() => this.bindScrollEnd());
80
82
  }
81
83
  };
82
- i([
83
- r("vuescrollConfig", { deep: !0 })
84
+ r([
85
+ i("vuescrollConfig", { deep: !0 })
84
86
  ], t.prototype, "watchVuescrollConfig", 1);
85
- i([
86
- r("analyseValues", { deep: !0 })
87
+ r([
88
+ i("analyseValues", { deep: !0 })
87
89
  ], t.prototype, "watchAnalyseValues", 1);
88
- i([
89
- r("singleModeConfig", { deep: !0 })
90
+ r([
91
+ i("singleModeConfig", { deep: !0 })
90
92
  ], t.prototype, "watchsingleModeConfig", 1);
91
- i([
92
- r("waveConfigs", { deep: !0 })
93
+ r([
94
+ i("waveConfigs", { deep: !0 })
93
95
  ], t.prototype, "watchWaveConfigs", 1);
94
- i([
95
- r("waveDataVersion")
96
+ r([
97
+ i("waveDataVersion")
96
98
  ], t.prototype, "watchWaveDataVersion", 1);
97
- i([
98
- r("leadHeadConfig", { deep: !0 })
99
+ r([
100
+ i("leadHeadConfig", { deep: !0 })
99
101
  ], t.prototype, "watchLeadHeadConfig", 1);
100
- i([
101
- r("leadModel", { deep: !0 })
102
+ r([
103
+ i("leadModel", { deep: !0 })
102
104
  ], t.prototype, "watchLeadModel", 1);
103
- i([
104
- r("width")
105
+ r([
106
+ i("width")
105
107
  ], t.prototype, "watchWidth", 1);
106
- i([
107
- r("height")
108
+ r([
109
+ i("height")
108
110
  ], t.prototype, "watchHeight", 1);
109
- i([
110
- r("longLeadConfig", { deep: !0 })
111
+ r([
112
+ i("longLeadConfig", { deep: !0 })
111
113
  ], t.prototype, "watchLongLeadConfig", 1);
112
- i([
113
- r("posStart")
114
+ r([
115
+ i("posStart")
114
116
  ], t.prototype, "watchPosStart", 1);
115
- t = i([
116
- l({
117
+ t = r([
118
+ p({
117
119
  name: "CommonWaveForm",
118
120
  components: {
119
- vueScroll: d,
121
+ vueScroll: c,
120
122
  MXBackgroundGrid: g,
121
- MXMeasuringRuler: m,
123
+ MXMeasuringRuler: d,
122
124
  MXParallelRuler: f,
123
125
  MXMagnifierWave: u
124
126
  }
@@ -160,6 +160,13 @@ export default class Methods extends Vue {
160
160
  protected sceneIsMouseDownX: number;
161
161
  protected lastScrollPointIdx: number;
162
162
  protected lastScrollLeft: number;
163
+ protected latestScrollPointIdx: {
164
+ slidIdxs: number;
165
+ scrollLeft: number;
166
+ } | null;
167
+ protected scrollEndTarget: HTMLElement | null;
168
+ protected scrollEndTimer: ReturnType<typeof setTimeout> | null;
169
+ protected usesScrollEnd: boolean;
163
170
  /** 滚动到未加载区间时暂存目标,数据到齐后再切换视图 */
164
171
  protected pendingScrollPointIdx: number | null;
165
172
  /** 实际画布容器大小 */
@@ -286,6 +293,11 @@ export default class Methods extends Vue {
286
293
  protected onContextmenu(e: ElementEvent, type: 'single' | 'rowAndCol' | 'add'): void;
287
294
  /** 波形点击事件,双击放大波形 */
288
295
  protected onDbClickWaveFrom(e: ElementEvent, type: 'single' | 'rowAndCol' | 'add'): void;
296
+ protected getScrollEndTarget(): HTMLElement | null;
297
+ protected emitScrollPointIdx(): void;
298
+ protected scheduleScrollEndFallback(): void;
299
+ protected handleScrollEnd: () => void;
300
+ protected bindScrollEnd(): void;
289
301
  /** 原生滚动条事件 */
290
302
  protected nativeScrollFunc(event: Event): void;
291
303
  /** 自定义滚动事件监听 */