@visactor/vchart 2.0.4-alpha.10 → 2.0.4-alpha.11

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
@@ -33544,6 +33544,11 @@ class RAFTickHandler {
33544
33544
  }
33545
33545
  }
33546
33546
  class DefaultTicker extends EventEmitter {
33547
+ pushFrameTime(time) {
33548
+ this.frameTimeHistory.push(time);
33549
+ const overflow = this.frameTimeHistory.length - 600;
33550
+ overflow > 0 && this.frameTimeHistory.splice(0, overflow);
33551
+ }
33547
33552
  constructor(stage) {
33548
33553
  super(), this.timelines = [], this.frameTimeHistory = [], this.handleTick = (handler, params) => {
33549
33554
  const {
@@ -33551,10 +33556,10 @@ class DefaultTicker extends EventEmitter {
33551
33556
  } = null != params ? params : {};
33552
33557
  if (this.ifCanStop()) return this.stop(), !1;
33553
33558
  const currentTime = handler.getTime();
33554
- this._lastTickTime = currentTime, this.lastFrameTime < 0 && (this.lastFrameTime = currentTime - this.interval + this.timeOffset, this.frameTimeHistory.push(this.lastFrameTime));
33559
+ this._lastTickTime = currentTime, this.lastFrameTime < 0 && (this.lastFrameTime = currentTime - this.interval + this.timeOffset, this.pushFrameTime(this.lastFrameTime));
33555
33560
  const delta = currentTime - this.lastFrameTime,
33556
33561
  skip = this.checkSkip(delta);
33557
- return skip || (this._handlerTick(delta), this.lastFrameTime = currentTime, this.frameTimeHistory.push(this.lastFrameTime)), once || handler.tick(this.interval, this.handleTick), !skip;
33562
+ return skip || (this._handlerTick(delta), this.lastFrameTime = currentTime, this.pushFrameTime(this.lastFrameTime)), once || handler.tick(this.interval, this.handleTick), !skip;
33558
33563
  }, this._handlerTick = delta => {
33559
33564
  this.status === STATUS$1.RUNNING && (this.tickCounts++, this.timelines.forEach(timeline => {
33560
33565
  timeline.tick(delta);
@@ -33643,7 +33648,7 @@ class DefaultTicker extends EventEmitter {
33643
33648
  }
33644
33649
  release() {
33645
33650
  var _a;
33646
- this.stop(), this.timelines = [], null === (_a = this.tickerHandler) || void 0 === _a || _a.release(), this.tickerHandler = null, this.lastFrameTime = -1, application.global.hooks.onSetEnv.unTap("graph-ticker", this._handleGraphTick);
33651
+ this.stop(), this.timelines = [], this.frameTimeHistory.length = 0, null === (_a = this.tickerHandler) || void 0 === _a || _a.release(), this.tickerHandler = null, this.lastFrameTime = -1, application.global.hooks.onSetEnv.unTap("graph-ticker", this._handleGraphTick);
33647
33652
  }
33648
33653
  checkSkip(delta) {
33649
33654
  var _a, _b, _c;
@@ -58904,7 +58909,7 @@ const lookup = (data, opt) => {
58904
58909
  });
58905
58910
  };
58906
58911
 
58907
- const version = "2.0.4-alpha.8";
58912
+ const version = "2.0.4-alpha.10";
58908
58913
 
58909
58914
  const addVChartProperty = (data, op) => {
58910
58915
  const context = op.beforeCall();
package/build/index.js CHANGED
@@ -33550,6 +33550,11 @@
33550
33550
  }
33551
33551
  }
33552
33552
  class DefaultTicker extends EventEmitter {
33553
+ pushFrameTime(time) {
33554
+ this.frameTimeHistory.push(time);
33555
+ const overflow = this.frameTimeHistory.length - 600;
33556
+ overflow > 0 && this.frameTimeHistory.splice(0, overflow);
33557
+ }
33553
33558
  constructor(stage) {
33554
33559
  super(), this.timelines = [], this.frameTimeHistory = [], this.handleTick = (handler, params) => {
33555
33560
  const {
@@ -33557,10 +33562,10 @@
33557
33562
  } = null != params ? params : {};
33558
33563
  if (this.ifCanStop()) return this.stop(), !1;
33559
33564
  const currentTime = handler.getTime();
33560
- this._lastTickTime = currentTime, this.lastFrameTime < 0 && (this.lastFrameTime = currentTime - this.interval + this.timeOffset, this.frameTimeHistory.push(this.lastFrameTime));
33565
+ this._lastTickTime = currentTime, this.lastFrameTime < 0 && (this.lastFrameTime = currentTime - this.interval + this.timeOffset, this.pushFrameTime(this.lastFrameTime));
33561
33566
  const delta = currentTime - this.lastFrameTime,
33562
33567
  skip = this.checkSkip(delta);
33563
- return skip || (this._handlerTick(delta), this.lastFrameTime = currentTime, this.frameTimeHistory.push(this.lastFrameTime)), once || handler.tick(this.interval, this.handleTick), !skip;
33568
+ return skip || (this._handlerTick(delta), this.lastFrameTime = currentTime, this.pushFrameTime(this.lastFrameTime)), once || handler.tick(this.interval, this.handleTick), !skip;
33564
33569
  }, this._handlerTick = delta => {
33565
33570
  this.status === STATUS$1.RUNNING && (this.tickCounts++, this.timelines.forEach(timeline => {
33566
33571
  timeline.tick(delta);
@@ -33649,7 +33654,7 @@
33649
33654
  }
33650
33655
  release() {
33651
33656
  var _a;
33652
- this.stop(), this.timelines = [], null === (_a = this.tickerHandler) || void 0 === _a || _a.release(), this.tickerHandler = null, this.lastFrameTime = -1, application.global.hooks.onSetEnv.unTap("graph-ticker", this._handleGraphTick);
33657
+ this.stop(), this.timelines = [], this.frameTimeHistory.length = 0, null === (_a = this.tickerHandler) || void 0 === _a || _a.release(), this.tickerHandler = null, this.lastFrameTime = -1, application.global.hooks.onSetEnv.unTap("graph-ticker", this._handleGraphTick);
33653
33658
  }
33654
33659
  checkSkip(delta) {
33655
33660
  var _a, _b, _c;
@@ -58910,7 +58915,7 @@
58910
58915
  });
58911
58916
  };
58912
58917
 
58913
- const version = "2.0.4-alpha.8";
58918
+ const version = "2.0.4-alpha.10";
58914
58919
 
58915
58920
  const addVChartProperty = (data, op) => {
58916
58921
  const context = op.beforeCall();