@visactor/vchart 2.0.1-alpha.1 → 2.0.1-alpha.2

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/build/index.es.js CHANGED
@@ -32118,7 +32118,8 @@ class DefaultTicker extends EventEmitter {
32118
32118
  this.stop(), this.timelines = [], null === (_a = this.tickerHandler) || void 0 === _a || _a.release(), this.tickerHandler = null, this.lastFrameTime = -1;
32119
32119
  }
32120
32120
  checkSkip(delta) {
32121
- if ("performance" === this.stage.params.optimize.tickRenderMode) return !1;
32121
+ var _a, _b, _c;
32122
+ if ("performance" === (null === (_c = null === (_b = null === (_a = this.stage) || void 0 === _a ? void 0 : _a.params) || void 0 === _b ? void 0 : _b.optimize) || void 0 === _c ? void 0 : _c.tickRenderMode)) return !1;
32122
32123
  return delta < this.interval + 2 * (Math.random() - .5) * this._jitter;
32123
32124
  }
32124
32125
  }
@@ -35772,16 +35773,15 @@ const moveIn = (graphic, options, animationParameters) => {
35772
35773
  changedY = 0;
35773
35774
  "negative" === orient && (changedX = null !== (_a = layoutRect.width) && void 0 !== _a ? _a : graphic.stage.viewWidth, changedY = null !== (_b = layoutRect.height) && void 0 !== _b ? _b : graphic.stage.viewHeight), changedX += offset, changedY += offset;
35774
35775
  const point = isFunction$1(pointOpt) ? pointOpt.call(null, null === (_d = null === (_c = graphic.context) || void 0 === _c ? void 0 : _c.data) || void 0 === _d ? void 0 : _d[0], graphic, animationParameters) : pointOpt,
35775
- fromX = point && isValidNumber$1(point.x) ? point.x : changedX,
35776
- fromY = point && isValidNumber$1(point.y) ? point.y : changedY,
35777
- finalAttrs = graphic.getFinalAttribute(),
35778
- finalAttrsX = excludeChannels.includes("x") ? graphic.attribute.x : finalAttrs.x,
35779
- finalAttrsY = excludeChannels.includes("y") ? graphic.attribute.y : finalAttrs.y;
35776
+ finalAttrsX = graphic.getGraphicAttribute("x"),
35777
+ finalAttrsY = graphic.getGraphicAttribute("y"),
35778
+ fromX = excludeChannels.includes("x") ? finalAttrsX : point && isValidNumber$1(point.x) ? point.x : changedX,
35779
+ fromY = excludeChannels.includes("y") ? finalAttrsY : point && isValidNumber$1(point.y) ? point.y : changedY;
35780
35780
  switch (direction) {
35781
35781
  case "x":
35782
35782
  return {
35783
35783
  from: {
35784
- x: fromX
35784
+ x: excludeChannels.includes("x") ? finalAttrsX : fromX
35785
35785
  },
35786
35786
  to: {
35787
35787
  x: finalAttrsX
@@ -35829,7 +35829,7 @@ const moveOut = (graphic, options, animationParameters) => {
35829
35829
  case "x":
35830
35830
  return {
35831
35831
  from: {
35832
- x: graphic.attribute.x
35832
+ x: graphic.getGraphicAttribute("x")
35833
35833
  },
35834
35834
  to: {
35835
35835
  x: fromX
@@ -35838,7 +35838,7 @@ const moveOut = (graphic, options, animationParameters) => {
35838
35838
  case "y":
35839
35839
  return {
35840
35840
  from: {
35841
- y: graphic.attribute.y
35841
+ y: graphic.getGraphicAttribute("y")
35842
35842
  },
35843
35843
  to: {
35844
35844
  y: fromY
@@ -35847,8 +35847,8 @@ const moveOut = (graphic, options, animationParameters) => {
35847
35847
  default:
35848
35848
  return {
35849
35849
  from: {
35850
- x: graphic.attribute.x,
35851
- y: graphic.attribute.y
35850
+ x: graphic.getGraphicAttribute("x"),
35851
+ y: graphic.getGraphicAttribute("y")
35852
35852
  },
35853
35853
  to: {
35854
35854
  x: fromX,
@@ -53841,6 +53841,7 @@ class BaseMark extends GrammarItem {
53841
53841
  this._dataByKey = mark._dataByKey;
53842
53842
  this._prevDataByKey = mark._prevDataByKey;
53843
53843
  this.needClear = mark.needClear;
53844
+ this._aniamtionStateCallback = mark._aniamtionStateCallback;
53844
53845
  }
53845
53846
  _parseProgressiveContext(data) {
53846
53847
  const enableProgressive = this._markConfig.progressiveStep > 0 &&
@@ -53897,7 +53898,7 @@ class BaseMark extends GrammarItem {
53897
53898
  config = config.length === 1 ? config[0] : config;
53898
53899
  }
53899
53900
  if (Array.isArray(config)) {
53900
- config = config.map((item, index) => {
53901
+ return config.map((item, index) => {
53901
53902
  var _a;
53902
53903
  return (Object.assign(Object.assign({}, item), { priority: (_a = item.priority) !== null && _a !== void 0 ? _a : Infinity }));
53903
53904
  });
@@ -56844,7 +56845,7 @@ const lookup = (data, opt) => {
56844
56845
  });
56845
56846
  };
56846
56847
 
56847
- const version = "2.0.1-alpha.1";
56848
+ const version = "2.0.1-alpha.2";
56848
56849
 
56849
56850
  const addVChartProperty = (data, op) => {
56850
56851
  const context = op.beforeCall();
@@ -95075,6 +95076,7 @@ class Player extends BaseComponent {
95075
95076
  this._option.globalInstance.on(ChartEvent.rendered, () => {
95076
95077
  var _a;
95077
95078
  if ((_a = this._spec) === null || _a === void 0 ? void 0 : _a.auto) {
95079
+ this._playerComponent.pause();
95078
95080
  this._playerComponent.play();
95079
95081
  }
95080
95082
  });
package/build/index.js CHANGED
@@ -32124,7 +32124,8 @@
32124
32124
  this.stop(), this.timelines = [], null === (_a = this.tickerHandler) || void 0 === _a || _a.release(), this.tickerHandler = null, this.lastFrameTime = -1;
32125
32125
  }
32126
32126
  checkSkip(delta) {
32127
- if ("performance" === this.stage.params.optimize.tickRenderMode) return !1;
32127
+ var _a, _b, _c;
32128
+ if ("performance" === (null === (_c = null === (_b = null === (_a = this.stage) || void 0 === _a ? void 0 : _a.params) || void 0 === _b ? void 0 : _b.optimize) || void 0 === _c ? void 0 : _c.tickRenderMode)) return !1;
32128
32129
  return delta < this.interval + 2 * (Math.random() - .5) * this._jitter;
32129
32130
  }
32130
32131
  }
@@ -35778,16 +35779,15 @@
35778
35779
  changedY = 0;
35779
35780
  "negative" === orient && (changedX = null !== (_a = layoutRect.width) && void 0 !== _a ? _a : graphic.stage.viewWidth, changedY = null !== (_b = layoutRect.height) && void 0 !== _b ? _b : graphic.stage.viewHeight), changedX += offset, changedY += offset;
35780
35781
  const point = isFunction$1(pointOpt) ? pointOpt.call(null, null === (_d = null === (_c = graphic.context) || void 0 === _c ? void 0 : _c.data) || void 0 === _d ? void 0 : _d[0], graphic, animationParameters) : pointOpt,
35781
- fromX = point && isValidNumber$1(point.x) ? point.x : changedX,
35782
- fromY = point && isValidNumber$1(point.y) ? point.y : changedY,
35783
- finalAttrs = graphic.getFinalAttribute(),
35784
- finalAttrsX = excludeChannels.includes("x") ? graphic.attribute.x : finalAttrs.x,
35785
- finalAttrsY = excludeChannels.includes("y") ? graphic.attribute.y : finalAttrs.y;
35782
+ finalAttrsX = graphic.getGraphicAttribute("x"),
35783
+ finalAttrsY = graphic.getGraphicAttribute("y"),
35784
+ fromX = excludeChannels.includes("x") ? finalAttrsX : point && isValidNumber$1(point.x) ? point.x : changedX,
35785
+ fromY = excludeChannels.includes("y") ? finalAttrsY : point && isValidNumber$1(point.y) ? point.y : changedY;
35786
35786
  switch (direction) {
35787
35787
  case "x":
35788
35788
  return {
35789
35789
  from: {
35790
- x: fromX
35790
+ x: excludeChannels.includes("x") ? finalAttrsX : fromX
35791
35791
  },
35792
35792
  to: {
35793
35793
  x: finalAttrsX
@@ -35835,7 +35835,7 @@
35835
35835
  case "x":
35836
35836
  return {
35837
35837
  from: {
35838
- x: graphic.attribute.x
35838
+ x: graphic.getGraphicAttribute("x")
35839
35839
  },
35840
35840
  to: {
35841
35841
  x: fromX
@@ -35844,7 +35844,7 @@
35844
35844
  case "y":
35845
35845
  return {
35846
35846
  from: {
35847
- y: graphic.attribute.y
35847
+ y: graphic.getGraphicAttribute("y")
35848
35848
  },
35849
35849
  to: {
35850
35850
  y: fromY
@@ -35853,8 +35853,8 @@
35853
35853
  default:
35854
35854
  return {
35855
35855
  from: {
35856
- x: graphic.attribute.x,
35857
- y: graphic.attribute.y
35856
+ x: graphic.getGraphicAttribute("x"),
35857
+ y: graphic.getGraphicAttribute("y")
35858
35858
  },
35859
35859
  to: {
35860
35860
  x: fromX,
@@ -53847,6 +53847,7 @@
53847
53847
  this._dataByKey = mark._dataByKey;
53848
53848
  this._prevDataByKey = mark._prevDataByKey;
53849
53849
  this.needClear = mark.needClear;
53850
+ this._aniamtionStateCallback = mark._aniamtionStateCallback;
53850
53851
  }
53851
53852
  _parseProgressiveContext(data) {
53852
53853
  const enableProgressive = this._markConfig.progressiveStep > 0 &&
@@ -53903,7 +53904,7 @@
53903
53904
  config = config.length === 1 ? config[0] : config;
53904
53905
  }
53905
53906
  if (Array.isArray(config)) {
53906
- config = config.map((item, index) => {
53907
+ return config.map((item, index) => {
53907
53908
  var _a;
53908
53909
  return (Object.assign(Object.assign({}, item), { priority: (_a = item.priority) !== null && _a !== void 0 ? _a : Infinity }));
53909
53910
  });
@@ -56850,7 +56851,7 @@
56850
56851
  });
56851
56852
  };
56852
56853
 
56853
- const version = "2.0.1-alpha.1";
56854
+ const version = "2.0.1-alpha.2";
56854
56855
 
56855
56856
  const addVChartProperty = (data, op) => {
56856
56857
  const context = op.beforeCall();
@@ -95081,6 +95082,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
95081
95082
  this._option.globalInstance.on(exports.ChartEvent.rendered, () => {
95082
95083
  var _a;
95083
95084
  if ((_a = this._spec) === null || _a === void 0 ? void 0 : _a.auto) {
95085
+ this._playerComponent.pause();
95084
95086
  this._playerComponent.play();
95085
95087
  }
95086
95088
  });