@visactor/vchart 1.3.2 → 1.3.3

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.
Files changed (47) hide show
  1. package/build/es5/index.js +2 -2
  2. package/build/index.js +23 -11
  3. package/build/index.min.js +1 -1
  4. package/build/tsconfig.tsbuildinfo +1 -1
  5. package/cjs/component/brush/brush.js +3 -1
  6. package/cjs/component/brush/brush.js.map +1 -1
  7. package/cjs/component/crosshair/cartesian.js +2 -1
  8. package/cjs/component/crosshair/cartesian.js.map +1 -1
  9. package/cjs/component/crosshair/polar.js +2 -1
  10. package/cjs/component/crosshair/polar.js.map +1 -1
  11. package/cjs/component/data-zoom/data-zoom/data-zoom.js +3 -2
  12. package/cjs/component/data-zoom/data-zoom/data-zoom.js.map +1 -1
  13. package/cjs/component/indicator/indicator.js +2 -1
  14. package/cjs/component/indicator/indicator.js.map +1 -1
  15. package/cjs/component/legend/base-legend.js +4 -2
  16. package/cjs/component/legend/base-legend.js.map +1 -1
  17. package/cjs/component/marker/base-marker.js +3 -2
  18. package/cjs/component/marker/base-marker.js.map +1 -1
  19. package/cjs/component/player/player.js +7 -3
  20. package/cjs/component/player/player.js.map +1 -1
  21. package/cjs/component/title/title.js +3 -2
  22. package/cjs/component/title/title.js.map +1 -1
  23. package/cjs/core/index.d.ts +1 -1
  24. package/cjs/core/index.js +1 -1
  25. package/cjs/core/index.js.map +1 -1
  26. package/esm/component/brush/brush.js +3 -1
  27. package/esm/component/brush/brush.js.map +1 -1
  28. package/esm/component/crosshair/cartesian.js +2 -1
  29. package/esm/component/crosshair/cartesian.js.map +1 -1
  30. package/esm/component/crosshair/polar.js +2 -1
  31. package/esm/component/crosshair/polar.js.map +1 -1
  32. package/esm/component/data-zoom/data-zoom/data-zoom.js +3 -2
  33. package/esm/component/data-zoom/data-zoom/data-zoom.js.map +1 -1
  34. package/esm/component/indicator/indicator.js +2 -1
  35. package/esm/component/indicator/indicator.js.map +1 -1
  36. package/esm/component/legend/base-legend.js +4 -2
  37. package/esm/component/legend/base-legend.js.map +1 -1
  38. package/esm/component/marker/base-marker.js +3 -2
  39. package/esm/component/marker/base-marker.js.map +1 -1
  40. package/esm/component/player/player.js +7 -3
  41. package/esm/component/player/player.js.map +1 -1
  42. package/esm/component/title/title.js +3 -2
  43. package/esm/component/title/title.js.map +1 -1
  44. package/esm/core/index.d.ts +1 -1
  45. package/esm/core/index.js +1 -1
  46. package/esm/core/index.js.map +1 -1
  47. package/package.json +3 -3
package/build/index.js CHANGED
@@ -60733,7 +60733,7 @@
60733
60733
  VChart.useMark([ComponentMark, GroupMark, ImageMark]);
60734
60734
  Factory.registerRegion('region', Region);
60735
60735
  Factory.registerLayout('base', Layout);
60736
- const version = "1.3.2";
60736
+ const version = "1.3.3";
60737
60737
  Logger.getInstance(LoggerLevel.Error);
60738
60738
 
60739
60739
  const Appear_ClipIn$1 = {
@@ -80830,8 +80830,9 @@
80830
80830
  };
80831
80831
  }
80832
80832
  clear() {
80833
+ var _a;
80833
80834
  if (this._component) {
80834
- this._container.removeChild(this._component);
80835
+ (_a = this.getContainer()) === null || _a === void 0 ? void 0 : _a.removeChild(this._component);
80835
80836
  this._component = null;
80836
80837
  }
80837
80838
  super.clear();
@@ -81278,8 +81279,9 @@
81278
81279
  }
81279
81280
  }
81280
81281
  clear() {
81282
+ var _a;
81281
81283
  if (this._brushComponents) {
81282
- this._container.removeChild(this._brushComponents);
81284
+ (_a = this.getContainer()) === null || _a === void 0 ? void 0 : _a.removeChild(this._brushComponents);
81283
81285
  this._brushComponents.forEach(brush => {
81284
81286
  brush.releaseBrushEvents();
81285
81287
  });
@@ -84822,8 +84824,9 @@
84822
84824
  this.event.emit(ChartEvent.legendSelectedDataChange, { model: this });
84823
84825
  }
84824
84826
  clear() {
84827
+ var _a;
84825
84828
  if (this._legendComponent) {
84826
- this._container.removeChild(this._legendComponent);
84829
+ (_a = this.getContainer()) === null || _a === void 0 ? void 0 : _a.removeChild(this._legendComponent);
84827
84830
  this._legendComponent = null;
84828
84831
  }
84829
84832
  this._cacheAttrs = null;
@@ -85443,8 +85446,9 @@
85443
85446
  return eachSeries(this._regions, s => model === s) || this._regions.includes(model);
85444
85447
  }
85445
85448
  clear() {
85449
+ var _a;
85446
85450
  if (this._indicatorComponent) {
85447
- this._container.removeChild(this._indicatorComponent);
85451
+ (_a = this.getContainer()) === null || _a === void 0 ? void 0 : _a.removeChild(this._indicatorComponent);
85448
85452
  this._indicatorComponent = null;
85449
85453
  }
85450
85454
  this._cacheAttrs = null;
@@ -85585,8 +85589,9 @@
85585
85589
  return this._titleComponent;
85586
85590
  }
85587
85591
  clear() {
85592
+ var _a;
85588
85593
  if (this._titleComponent) {
85589
- this._container.removeChild(this._titleComponent);
85594
+ (_a = this.getContainer()) === null || _a === void 0 ? void 0 : _a.removeChild(this._titleComponent);
85590
85595
  this._titleComponent = null;
85591
85596
  }
85592
85597
  this._cacheAttrs = null;
@@ -86750,7 +86755,7 @@
86750
86755
  ].forEach(c => {
86751
86756
  var _a;
86752
86757
  if (c) {
86753
- (_a = this._container) === null || _a === void 0 ? void 0 : _a.removeChild(c);
86758
+ (_a = this.getContainer()) === null || _a === void 0 ? void 0 : _a.removeChild(c);
86754
86759
  c = null;
86755
86760
  }
86756
86761
  });
@@ -87105,7 +87110,7 @@
87105
87110
  [(this._radiusCrosshair, this._radiusLabelCrosshair, this._angleCrosshair, this._angleLabelCrosshair)].forEach(c => {
87106
87111
  var _a;
87107
87112
  if (c) {
87108
- (_a = this._container) === null || _a === void 0 ? void 0 : _a.removeChild(c);
87113
+ (_a = this.getContainer()) === null || _a === void 0 ? void 0 : _a.removeChild(c);
87109
87114
  c = null;
87110
87115
  }
87111
87116
  });
@@ -87204,11 +87209,13 @@
87204
87209
  };
87205
87210
  this._initEvent = () => {
87206
87211
  this._option.globalInstance.on(ChartEvent.rendered, () => {
87207
- if (this._spec.auto) {
87212
+ var _a;
87213
+ if ((_a = this._spec) === null || _a === void 0 ? void 0 : _a.auto) {
87208
87214
  this._playerComponent.play();
87209
87215
  }
87210
87216
  });
87211
87217
  this._playerComponent.addEventListener(PlayerEventEnum.OnEnd, () => {
87218
+ var _a;
87212
87219
  this.event.emit(ChartEvent.playerEnd, { model: this });
87213
87220
  if (this._alternate && this._spec.type === 'discrete') {
87214
87221
  this._direction = this._direction === 'default' ? 'reverse' : 'default';
@@ -87217,7 +87224,7 @@
87217
87224
  dataIndex: this._direction === 'reverse' ? this._specs.length - 2 : 1
87218
87225
  });
87219
87226
  }
87220
- if (this._spec.loop) {
87227
+ if ((_a = this._spec) === null || _a === void 0 ? void 0 : _a.loop) {
87221
87228
  this._playerComponent.play();
87222
87229
  }
87223
87230
  });
@@ -87332,7 +87339,11 @@
87332
87339
  onRender(ctx) {
87333
87340
  }
87334
87341
  clear() {
87342
+ var _a;
87335
87343
  super.clear();
87344
+ if (this._playerComponent) {
87345
+ (_a = this.getContainer()) === null || _a === void 0 ? void 0 : _a.removeChild(this._playerComponent);
87346
+ }
87336
87347
  this._playerComponent = null;
87337
87348
  }
87338
87349
  _computeLayoutRect(rect, width, height) {
@@ -87714,8 +87725,9 @@
87714
87725
  return null;
87715
87726
  }
87716
87727
  clear() {
87728
+ var _a;
87717
87729
  if (this._markerComponent) {
87718
- this._container.removeChild(this._markerComponent);
87730
+ (_a = this.getContainer()) === null || _a === void 0 ? void 0 : _a.removeChild(this._markerComponent);
87719
87731
  this._markerComponent = null;
87720
87732
  }
87721
87733
  super.clear();