@visactor/vchart 2.0.4-alpha.2 → 2.0.4-alpha.4

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
@@ -49702,21 +49702,13 @@ class EventDispatcher {
49702
49702
  }
49703
49703
  return true;
49704
49704
  }
49705
- _prepareParams(filter, params) {
49706
- var _a, _b, _c;
49707
- if (filter.markName && params.mark) {
49708
- const markGraphic = (_c = (_b = (_a = params.mark).getGraphics) === null || _b === void 0 ? void 0 : _b.call(_a)) === null || _c === void 0 ? void 0 : _c[0];
49709
- return Object.assign(Object.assign({}, params), { item: markGraphic, datum: getDatumOfGraphic(markGraphic) });
49710
- }
49711
- return Object.assign({}, params);
49712
- }
49713
49705
  _invoke(handlers, type, params) {
49714
49706
  const result = handlers.map(handler => {
49715
49707
  var _a, _b, _c;
49716
49708
  const filter = handler.filter;
49717
49709
  if (!handler.prevented && (!handler.query || this._filter(filter, type, params))) {
49718
49710
  const callback = handler.wrappedCallback || handler.callback;
49719
- const stopBubble = callback.call(null, this._prepareParams(filter, params));
49711
+ const stopBubble = callback.call(null, Object.assign({}, params));
49720
49712
  const doStopBubble = stopBubble !== null && stopBubble !== void 0 ? stopBubble : (_a = handler.query) === null || _a === void 0 ? void 0 : _a.consume;
49721
49713
  if (doStopBubble) {
49722
49714
  (_b = params.event) === null || _b === void 0 ? void 0 : _b.stopPropagation();
@@ -50246,7 +50238,7 @@ class Compiler {
50246
50238
  (_b = (_a = this._compileChart) === null || _a === void 0 ? void 0 : _a.getEvent()) === null || _b === void 0 ? void 0 : _b.emit(ChartEvent.afterRender, { chart: this._compileChart });
50247
50239
  };
50248
50240
  this._handleAfterNextRender = () => {
50249
- var _a, _b;
50241
+ var _a, _b, _c;
50250
50242
  if (this._stage && !this._option.disableDirtyBounds) {
50251
50243
  this._stage.enableDirtyBounds();
50252
50244
  }
@@ -50256,6 +50248,7 @@ class Compiler {
50256
50248
  vchart: (_b = this._compileChart.getOption()) === null || _b === void 0 ? void 0 : _b.globalInstance
50257
50249
  });
50258
50250
  }
50251
+ (_c = this._option.performanceHook) === null || _c === void 0 ? void 0 : _c.afterVRenderDraw(this._compileChart.getOption().globalInstance);
50259
50252
  };
50260
50253
  this.handleProgressiveFrame = () => {
50261
50254
  if (this._progressiveMarks.length) {
@@ -50405,6 +50398,7 @@ class Compiler {
50405
50398
  });
50406
50399
  }
50407
50400
  _doRender(immediately) {
50401
+ var _a;
50408
50402
  if (this._stage) {
50409
50403
  this._rootMarks.forEach(g => {
50410
50404
  traverseGroupMark(g, m => {
@@ -50421,6 +50415,7 @@ class Compiler {
50421
50415
  this._stage.afterNextRender(this._handleAfterNextRender);
50422
50416
  if (immediately) {
50423
50417
  this._stage.render();
50418
+ (_a = this._option.performanceHook) === null || _a === void 0 ? void 0 : _a.afterVRenderDraw(this._compileChart.getOption().globalInstance);
50424
50419
  }
50425
50420
  }
50426
50421
  }
@@ -56926,7 +56921,7 @@ const lookup = (data, opt) => {
56926
56921
  });
56927
56922
  };
56928
56923
 
56929
- const version = "2.0.4-alpha.2";
56924
+ const version = "2.0.4-alpha.4";
56930
56925
 
56931
56926
  const addVChartProperty = (data, op) => {
56932
56927
  const context = op.beforeCall();
package/build/index.js CHANGED
@@ -49708,21 +49708,13 @@
49708
49708
  }
49709
49709
  return true;
49710
49710
  }
49711
- _prepareParams(filter, params) {
49712
- var _a, _b, _c;
49713
- if (filter.markName && params.mark) {
49714
- const markGraphic = (_c = (_b = (_a = params.mark).getGraphics) === null || _b === void 0 ? void 0 : _b.call(_a)) === null || _c === void 0 ? void 0 : _c[0];
49715
- return Object.assign(Object.assign({}, params), { item: markGraphic, datum: getDatumOfGraphic(markGraphic) });
49716
- }
49717
- return Object.assign({}, params);
49718
- }
49719
49711
  _invoke(handlers, type, params) {
49720
49712
  const result = handlers.map(handler => {
49721
49713
  var _a, _b, _c;
49722
49714
  const filter = handler.filter;
49723
49715
  if (!handler.prevented && (!handler.query || this._filter(filter, type, params))) {
49724
49716
  const callback = handler.wrappedCallback || handler.callback;
49725
- const stopBubble = callback.call(null, this._prepareParams(filter, params));
49717
+ const stopBubble = callback.call(null, Object.assign({}, params));
49726
49718
  const doStopBubble = stopBubble !== null && stopBubble !== void 0 ? stopBubble : (_a = handler.query) === null || _a === void 0 ? void 0 : _a.consume;
49727
49719
  if (doStopBubble) {
49728
49720
  (_b = params.event) === null || _b === void 0 ? void 0 : _b.stopPropagation();
@@ -50252,7 +50244,7 @@
50252
50244
  (_b = (_a = this._compileChart) === null || _a === void 0 ? void 0 : _a.getEvent()) === null || _b === void 0 ? void 0 : _b.emit(exports.ChartEvent.afterRender, { chart: this._compileChart });
50253
50245
  };
50254
50246
  this._handleAfterNextRender = () => {
50255
- var _a, _b;
50247
+ var _a, _b, _c;
50256
50248
  if (this._stage && !this._option.disableDirtyBounds) {
50257
50249
  this._stage.enableDirtyBounds();
50258
50250
  }
@@ -50262,6 +50254,7 @@
50262
50254
  vchart: (_b = this._compileChart.getOption()) === null || _b === void 0 ? void 0 : _b.globalInstance
50263
50255
  });
50264
50256
  }
50257
+ (_c = this._option.performanceHook) === null || _c === void 0 ? void 0 : _c.afterVRenderDraw(this._compileChart.getOption().globalInstance);
50265
50258
  };
50266
50259
  this.handleProgressiveFrame = () => {
50267
50260
  if (this._progressiveMarks.length) {
@@ -50411,6 +50404,7 @@
50411
50404
  });
50412
50405
  }
50413
50406
  _doRender(immediately) {
50407
+ var _a;
50414
50408
  if (this._stage) {
50415
50409
  this._rootMarks.forEach(g => {
50416
50410
  traverseGroupMark(g, m => {
@@ -50427,6 +50421,7 @@
50427
50421
  this._stage.afterNextRender(this._handleAfterNextRender);
50428
50422
  if (immediately) {
50429
50423
  this._stage.render();
50424
+ (_a = this._option.performanceHook) === null || _a === void 0 ? void 0 : _a.afterVRenderDraw(this._compileChart.getOption().globalInstance);
50430
50425
  }
50431
50426
  }
50432
50427
  }
@@ -56932,7 +56927,7 @@
56932
56927
  });
56933
56928
  };
56934
56929
 
56935
- const version = "2.0.4-alpha.2";
56930
+ const version = "2.0.4-alpha.4";
56936
56931
 
56937
56932
  const addVChartProperty = (data, op) => {
56938
56933
  const context = op.beforeCall();