@visactor/vchart 2.0.4-alpha.6 → 2.0.4-alpha.8

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 (40) hide show
  1. package/build/es5/index.js +1 -1
  2. package/build/index.es.js +62 -41
  3. package/build/index.js +62 -41
  4. package/build/index.min.js +2 -2
  5. package/build/tsconfig.tsbuildinfo +1 -1
  6. package/cjs/animation/utils.js +1 -1
  7. package/cjs/animation/utils.js.map +1 -1
  8. package/cjs/compile/compiler.js +3 -4
  9. package/cjs/compile/compiler.js.map +1 -1
  10. package/cjs/component/base/base-component.js.map +1 -1
  11. package/cjs/component/custom-mark/custom-mark.js +2 -1
  12. package/cjs/component/custom-mark/custom-mark.js.map +1 -1
  13. package/cjs/core/index.d.ts +1 -1
  14. package/cjs/core/index.js +1 -1
  15. package/cjs/core/index.js.map +1 -1
  16. package/cjs/event/event-dispatcher.d.ts +1 -0
  17. package/cjs/event/event-dispatcher.js +12 -1
  18. package/cjs/event/event-dispatcher.js.map +1 -1
  19. package/cjs/series/treemap/treemap.js +2 -2
  20. package/cjs/series/treemap/treemap.js.map +1 -1
  21. package/cjs/util/style.js +2 -3
  22. package/cjs/util/style.js.map +1 -1
  23. package/esm/animation/utils.js +1 -1
  24. package/esm/animation/utils.js.map +1 -1
  25. package/esm/compile/compiler.js +3 -4
  26. package/esm/compile/compiler.js.map +1 -1
  27. package/esm/component/base/base-component.js.map +1 -1
  28. package/esm/component/custom-mark/custom-mark.js +2 -1
  29. package/esm/component/custom-mark/custom-mark.js.map +1 -1
  30. package/esm/core/index.d.ts +1 -1
  31. package/esm/core/index.js +1 -1
  32. package/esm/core/index.js.map +1 -1
  33. package/esm/event/event-dispatcher.d.ts +1 -0
  34. package/esm/event/event-dispatcher.js +12 -1
  35. package/esm/event/event-dispatcher.js.map +1 -1
  36. package/esm/series/treemap/treemap.js +2 -2
  37. package/esm/series/treemap/treemap.js.map +1 -1
  38. package/esm/util/style.js +2 -3
  39. package/esm/util/style.js.map +1 -1
  40. package/package.json +6 -6
package/build/index.es.js CHANGED
@@ -9493,7 +9493,8 @@ const DefaultRectAttribute = Object.assign(Object.assign({}, DefaultAttribute),
9493
9493
  y1: 0,
9494
9494
  strokeBoundsBuffer: 0,
9495
9495
  cornerRadius: 0,
9496
- cornerType: "round"
9496
+ cornerType: "round",
9497
+ drawStrokeWhenZeroWH: !1
9497
9498
  });
9498
9499
  Object.assign(Object.assign({}, DefaultAttribute), {
9499
9500
  width: 0,
@@ -9502,7 +9503,8 @@ Object.assign(Object.assign({}, DefaultAttribute), {
9502
9503
  y1: 0,
9503
9504
  cornerRadius: 0,
9504
9505
  length: 0,
9505
- cornerType: "round"
9506
+ cornerType: "round",
9507
+ drawStrokeWhenZeroWH: !1
9506
9508
  });
9507
9509
  const DefaultSymbolAttribute = Object.assign(Object.assign({}, DefaultAttribute), {
9508
9510
  symbolType: "circle",
@@ -14175,7 +14177,7 @@ class Graphic extends Node {
14175
14177
  });
14176
14178
  }
14177
14179
  setAttributes(params, forceUpdateTag = !1, context) {
14178
- (params = this.onBeforeAttributeUpdate && this.onBeforeAttributeUpdate(params, this.attribute, null, context) || params).background ? this.loadImage(params.background, !0) : params.shadowGraphic && this.setShadowGraphic(params.shadowGraphic), this._setAttributes(params, forceUpdateTag, context);
14180
+ params && ((params = this.onBeforeAttributeUpdate && this.onBeforeAttributeUpdate(params, this.attribute, null, context) || params).background ? this.loadImage(params.background, !0) : params.shadowGraphic && this.setShadowGraphic(params.shadowGraphic), this._setAttributes(params, forceUpdateTag, context));
14179
14181
  }
14180
14182
  _setAttributes(params, forceUpdateTag = !1, context) {
14181
14183
  const keys = Object.keys(params);
@@ -15000,8 +15002,8 @@ function rectFillVisible(opacity, fillOpacity, width, height, fill) {
15000
15002
  function strokeVisible(opacity, strokeOpacity) {
15001
15003
  return opacity * strokeOpacity > 0;
15002
15004
  }
15003
- function rectStrokeVisible(opacity, strokeOpacity, width, height) {
15004
- return opacity * strokeOpacity > 0 && 0 !== width && 0 !== height;
15005
+ function rectStrokeVisible(opacity, strokeOpacity, width, height, drawStrokeWhenZeroWH) {
15006
+ return drawStrokeWhenZeroWH ? opacity * strokeOpacity > 0 : opacity * strokeOpacity > 0 && 0 !== width && 0 !== height;
15005
15007
  }
15006
15008
  function intersect(x0, y0, x1, y1, x2, y2, x3, y3) {
15007
15009
  const x10 = x1 - x0,
@@ -16371,14 +16373,10 @@ class Glyph extends Graphic {
16371
16373
  attrs && (Object.assign(stateAttrs, attrs.attributes), (null === (_a = attrs.subAttributes) || void 0 === _a ? void 0 : _a.length) && subAttrs.forEach((subAttrs, index) => {
16372
16374
  Object.assign(subAttrs, attrs.subAttributes[index]);
16373
16375
  }));
16374
- }), this.subGraphic.forEach((graphic, index) => {
16375
- graphic.updateNormalAttrs(subAttrs[index]), graphic.applyStateAttrs(subAttrs[index], states, hasAnimation);
16376
16376
  }), this.updateNormalAttrs(stateAttrs), this.currentStates = states, this.applyStateAttrs(stateAttrs, states, hasAnimation);
16377
16377
  }
16378
16378
  clearStates(hasAnimation) {
16379
- this.stopStateAnimates(), this.hasState() && this.normalAttrs ? (this.currentStates = [], this.subGraphic.forEach(graphic => {
16380
- graphic.applyStateAttrs(graphic.normalAttrs, this.currentStates, hasAnimation, !0), graphic.normalAttrs = null;
16381
- }), this.applyStateAttrs(this.normalAttrs, this.currentStates, hasAnimation, !0)) : this.currentStates = [], this.normalAttrs = null;
16379
+ this.stopStateAnimates(), this.hasState() && this.normalAttrs ? (this.currentStates = [], this.applyStateAttrs(this.normalAttrs, this.currentStates, hasAnimation, !0)) : this.currentStates = [], this.normalAttrs = null;
16382
16380
  }
16383
16381
  clone() {
16384
16382
  const glyph = new Glyph(Object.assign({}, this.attribute));
@@ -19637,7 +19635,8 @@ let DefaultCanvasRectRender = class extends BaseRender {
19637
19635
  y1: y1,
19638
19636
  x: originX = rectAttribute.x,
19639
19637
  y: originY = rectAttribute.y,
19640
- fillStrokeOrder = rectAttribute.fillStrokeOrder
19638
+ fillStrokeOrder = rectAttribute.fillStrokeOrder,
19639
+ drawStrokeWhenZeroWH = rectAttribute.drawStrokeWhenZeroWH
19641
19640
  } = rect.attribute;
19642
19641
  let {
19643
19642
  width: width,
@@ -19645,7 +19644,7 @@ let DefaultCanvasRectRender = class extends BaseRender {
19645
19644
  } = rect.attribute;
19646
19645
  width = (null != width ? width : x1 - originX) || 0, height = (null != height ? height : y1 - originY) || 0;
19647
19646
  const fVisible = rectFillVisible(opacity, fillOpacity, width, height, fill),
19648
- sVisible = rectStrokeVisible(opacity, strokeOpacity, width, height),
19647
+ sVisible = rectStrokeVisible(opacity, strokeOpacity, width, height, drawStrokeWhenZeroWH),
19649
19648
  doFill = runFill(fill, background),
19650
19649
  doStroke = runStroke(stroke, lineWidth);
19651
19650
  if (!rect.valid || !visible) return;
@@ -21703,13 +21702,13 @@ class Stage extends Group$1 {
21703
21702
  this._skipRender > 1 && this.renderNextFrame(), this._skipRender = 0;
21704
21703
  } else this._skipRender = 1;
21705
21704
  }, this.beforeRender = stage => {
21706
- this._beforeRender && this._beforeRender(stage);
21705
+ this._beforeRenderList.forEach(cb => cb(stage));
21707
21706
  }, this.afterClearScreen = drawParams => {
21708
21707
  this._afterClearScreen && this._afterClearScreen(drawParams);
21709
21708
  }, this.afterClearRect = drawParams => {
21710
21709
  this._afterClearRect && this._afterClearRect(drawParams);
21711
21710
  }, this.afterRender = stage => {
21712
- this.renderCount++, this._afterRender && this._afterRender(stage), this._afterNextRenderCbs && this._afterNextRenderCbs.forEach(cb => cb(stage)), this._afterNextRenderCbs = null, this.tickedBeforeRender = !1;
21711
+ this.renderCount++, this._afterRenderList.forEach(cb => cb(stage)), this._afterNextRenderCbs && this._afterNextRenderCbs.forEach(cb => cb(stage)), this._afterNextRenderCbs = null, this.tickedBeforeRender = !1;
21713
21712
  }, this.afterTickCb = () => {
21714
21713
  this.tickedBeforeRender = !0, "rendering" !== this.state && this.renderNextFrame();
21715
21714
  }, this.params = params, this.theme = new Theme(), this.hooks = {
@@ -21717,7 +21716,7 @@ class Stage extends Group$1 {
21717
21716
  afterRender: new SyncHook(["stage"]),
21718
21717
  afterClearScreen: new SyncHook(["stage"]),
21719
21718
  afterClearRect: new SyncHook(["stage"])
21720
- }, this.global = application.global, !this.global.env && isBrowserEnv() && this.global.setEnv("browser"), this.window = container.get(VWindow), this.renderService = container.get(RenderService), this.pluginService = container.get(PluginService), this.layerService = container.get(LayerService), this.graphicService = container.get(GraphicService), this.pluginService.active(this, params), this.window.create({
21719
+ }, this.global = application.global, !this.global.env && isBrowserEnv() && this.global.setEnv("browser"), this.window = container.get(VWindow), this.renderService = container.get(RenderService), this.pluginService = container.get(PluginService), this.layerService = container.get(LayerService), this.graphicService = container.get(GraphicService), this.pluginService.active(this, params), this._beforeRenderList = [], this._afterRenderList = [], this.window.create({
21721
21720
  width: params.width,
21722
21721
  height: params.height,
21723
21722
  viewBox: params.viewBox,
@@ -21728,7 +21727,7 @@ class Stage extends Group$1 {
21728
21727
  canvas: params.canvas
21729
21728
  }), this.state = "normal", this.renderCount = 0, this.tryInitEventSystem(), this._background = null !== (_a = params.background) && void 0 !== _a ? _a : DefaultConfig.BACKGROUND, this.appendChild(this.layerService.createLayer(this, {
21730
21729
  main: !0
21731
- })), this.nextFrameRenderLayerSet = new Set(), this.willNextFrameRender = !1, this.stage = this, this.renderStyle = params.renderStyle, params.autoRender && this.enableAutoRender(), params.autoRefresh && this.enableAutoRefresh(), !1 === params.disableDirtyBounds && this.enableDirtyBounds(), params.enableHtmlAttribute && this.enableHtmlAttribute(params.enableHtmlAttribute), params.ReactDOM && this.enableReactAttribute(params.ReactDOM), params.enableLayout && this.enableLayout(), this.hooks.beforeRender.tap("constructor", this.beforeRender), this.hooks.afterRender.tap("constructor", this.afterRender), this.hooks.afterClearScreen.tap("constructor", this.afterClearScreen), this.hooks.afterClearRect.tap("constructor", this.afterClearRect), this._beforeRender = params.beforeRender, this._afterRender = params.afterRender, this._afterClearScreen = params.afterClearScreen, this._afterClearRect = params.afterClearRect, this.supportInteractiveLayer = !1 !== params.interactiveLayer, params.optimize || (params.optimize = {
21730
+ })), this.nextFrameRenderLayerSet = new Set(), this.willNextFrameRender = !1, this.stage = this, this.renderStyle = params.renderStyle, params.autoRender && this.enableAutoRender(), params.autoRefresh && this.enableAutoRefresh(), !1 === params.disableDirtyBounds && this.enableDirtyBounds(), params.enableHtmlAttribute && this.enableHtmlAttribute(params.enableHtmlAttribute), params.ReactDOM && this.enableReactAttribute(params.ReactDOM), params.enableLayout && this.enableLayout(), this.hooks.beforeRender.tap("constructor", this.beforeRender), this.hooks.afterRender.tap("constructor", this.afterRender), params.beforeRender && this._beforeRenderList.push(params.beforeRender), params.afterRender && this._afterRenderList.push(params.afterRender), this.hooks.afterClearScreen.tap("constructor", this.afterClearScreen), this.hooks.afterClearRect.tap("constructor", this.afterClearRect), this._afterClearScreen = params.afterClearScreen, this._afterClearRect = params.afterClearRect, this.supportInteractiveLayer = !1 !== params.interactiveLayer, params.optimize || (params.optimize = {
21732
21731
  tickRenderMode: "effect"
21733
21732
  }), this.optmize(params.optimize), params.background && isString$1(this._background) && this._background.includes("/") && this.setAttributes({
21734
21733
  background: this._background
@@ -21843,10 +21842,16 @@ class Stage extends Group$1 {
21843
21842
  options.enableView3dTransform && this.enableView3dTransform();
21844
21843
  }
21845
21844
  setBeforeRender(cb) {
21846
- this._beforeRender = cb;
21845
+ this._beforeRenderList.push(cb);
21846
+ }
21847
+ removeBeforeRender(cb) {
21848
+ this._beforeRenderList = this._beforeRenderList.filter(c => c !== cb);
21847
21849
  }
21848
21850
  setAfterRender(cb) {
21849
- this._afterRender = cb;
21851
+ this._afterRenderList.push(cb);
21852
+ }
21853
+ removeAfterRender(cb) {
21854
+ this._afterRenderList = this._afterRenderList.filter(c => c !== cb);
21850
21855
  }
21851
21856
  afterNextRender(cb) {
21852
21857
  this._afterNextRenderCbs || (this._afterNextRenderCbs = []), this._afterNextRenderCbs.push(cb);
@@ -31713,6 +31718,7 @@ class Step {
31713
31718
  return this.getEndProps();
31714
31719
  }
31715
31720
  stop() {}
31721
+ release() {}
31716
31722
  }
31717
31723
  class WaitStep extends Step {
31718
31724
  constructor(type, props, duration, easing) {
@@ -31930,7 +31936,9 @@ class Animate {
31930
31936
  this.status !== AnimateStatus.END && this.onEnd(), this.status = AnimateStatus.END, this.target && ("start" === type ? this.target.setAttributes(this._startProps) : "end" === type ? this.target.setAttributes(this._endProps) : type && this.target.setAttributes(type));
31931
31937
  }
31932
31938
  release() {
31933
- this.status = AnimateStatus.END, this._onRemove && this._onRemove.forEach(cb => cb()), this._onStart = [], this._onFrame = [], this._onEnd = [], this._onRemove = [];
31939
+ this.status = AnimateStatus.END, this._onRemove && this._onRemove.forEach(cb => cb()), this._onStart = [], this._onFrame = [], this._onEnd = [], this._onRemove = [], this.forEachStep(step => {
31940
+ step.release();
31941
+ });
31934
31942
  }
31935
31943
  getDuration() {
31936
31944
  return this._duration;
@@ -32004,6 +32012,10 @@ class Animate {
32004
32012
  getLoop() {
32005
32013
  return this._loopCount;
32006
32014
  }
32015
+ forEachStep(cb) {
32016
+ let step = this._firstStep;
32017
+ for (; step;) cb(step), step = step.next;
32018
+ }
32007
32019
  }
32008
32020
 
32009
32021
  const performanceRAF = new PerformanceRAF();
@@ -32283,6 +32295,9 @@ class AnimateExecutor {
32283
32295
  constructor(target) {
32284
32296
  this._animates = [], this._startCallbacks = [], this._endCallbacks = [], this._started = !1, this._activeCount = 0, this._target = target;
32285
32297
  }
32298
+ get started() {
32299
+ return this._started;
32300
+ }
32286
32301
  onStart(cb) {
32287
32302
  cb ? (this._startCallbacks.push(cb), this._started && this._activeCount > 0 && cb()) : this._startCallbacks.forEach(cb => {
32288
32303
  cb();
@@ -32423,14 +32438,14 @@ class AnimateExecutor {
32423
32438
  return delayAfterValue > 0 && (totalDelay += delayAfterValue), totalDelay > 0 && animate.wait(totalDelay), loop && loop > 0 && animate.loop(loop), bounce && animate.bounce(!0), animate;
32424
32439
  }
32425
32440
  _handleRunAnimate(animate, custom, customType, from, props, duration, easing, customParameters, controlOptions, options, type, graphic) {
32426
- var _a, _b, _c, _d;
32441
+ var _a, _b, _c, _d, _e, _f;
32427
32442
  if (custom && customType) {
32428
32443
  const customParams = Object.assign({
32429
- width: graphic.stage.width,
32430
- height: graphic.stage.height,
32444
+ width: (null === (_a = graphic.stage) || void 0 === _a ? void 0 : _a.width) || 0,
32445
+ height: (null === (_b = graphic.stage) || void 0 === _b ? void 0 : _b.height) || 0,
32431
32446
  group: this._target.parent
32432
32447
  }, this.resolveValue(customParameters, graphic)),
32433
- objOptions = isFunction$1(options) ? options.call(null, null !== (_b = customParams && (null === (_a = customParams.data) || void 0 === _a ? void 0 : _a[0])) && void 0 !== _b ? _b : null === (_d = null === (_c = graphic.context) || void 0 === _c ? void 0 : _c.data) || void 0 === _d ? void 0 : _d[0], graphic, customParams) : options;
32448
+ objOptions = isFunction$1(options) ? options.call(null, null !== (_d = customParams && (null === (_c = customParams.data) || void 0 === _c ? void 0 : _c[0])) && void 0 !== _d ? _d : null === (_f = null === (_e = graphic.context) || void 0 === _e ? void 0 : _e.data) || void 0 === _f ? void 0 : _f[0], graphic, customParams) : options;
32434
32449
  customParams.options = objOptions, customParams.controlOptions = controlOptions, 1 === customType ? this.createCustomAnimation(animate, custom, from, props, duration, easing, customParams) : 2 === customType && this.createCustomInterpolatorAnimation(animate, custom, props, duration, easing, customParams);
32435
32450
  } else "to" === type ? animate.to(props, duration, easing) : "from" === type && animate.from(props, duration, easing);
32436
32451
  }
@@ -32650,7 +32665,7 @@ class AnimationStateManager {
32650
32665
  reApplyState(state) {
32651
32666
  var _a;
32652
32667
  const stateInfo = null === (_a = this.stateList) || void 0 === _a ? void 0 : _a.find(stateInfo => stateInfo.state === state);
32653
- if (stateInfo) {
32668
+ if (stateInfo && stateInfo.executor.started) {
32654
32669
  const stateList = this.stateList.slice();
32655
32670
  stateInfo.executor.stop(), this.stateList = stateList, stateInfo.executor.execute(stateInfo.animationConfig);
32656
32671
  }
@@ -33694,7 +33709,7 @@ class GrowAngleBase extends ACustomAnimate {
33694
33709
  }
33695
33710
  class GrowAngleIn extends GrowAngleBase {
33696
33711
  onBind() {
33697
- var _a, _b;
33712
+ var _a, _b, _c;
33698
33713
  super.onBind();
33699
33714
  const {
33700
33715
  from: from,
@@ -33703,7 +33718,7 @@ class GrowAngleIn extends GrowAngleBase {
33703
33718
  fromAttrs = null !== (_b = null === (_a = this.target.context) || void 0 === _a ? void 0 : _a.lastAttrs) && void 0 !== _b ? _b : from;
33704
33719
  this.props = to, this.propKeys = Object.keys(to).filter(key => null != to[key]), this.from = fromAttrs, this.to = to;
33705
33720
  const finalAttribute = this.target.getFinalAttribute();
33706
- finalAttribute && this.target.setAttributes(finalAttribute), this.target.setAttributes(fromAttrs), this.determineUpdateFunction();
33721
+ finalAttribute && this.target.setAttributes(finalAttribute), !1 !== (null === (_c = this.params.controlOptions) || void 0 === _c ? void 0 : _c.immediatelyApply) && this.target.setAttributes(fromAttrs), this.determineUpdateFunction();
33707
33722
  }
33708
33723
  }
33709
33724
  class GrowAngleOut extends GrowAngleBase {
@@ -34311,7 +34326,7 @@ class GrowPointsBase extends ACustomAnimate {
34311
34326
  }
34312
34327
  class GrowRadiusIn extends GrowPointsBase {
34313
34328
  onBind() {
34314
- var _a, _b;
34329
+ var _a, _b, _c;
34315
34330
  super.onBind();
34316
34331
  const {
34317
34332
  from: from,
@@ -34320,7 +34335,7 @@ class GrowRadiusIn extends GrowPointsBase {
34320
34335
  fromAttrs = null !== (_b = null === (_a = this.target.context) || void 0 === _a ? void 0 : _a.lastAttrs) && void 0 !== _b ? _b : from;
34321
34336
  this.props = to, this.propKeys = Object.keys(to).filter(key => null != to[key]), this.from = fromAttrs, this.to = to;
34322
34337
  const finalAttribute = this.target.getFinalAttribute();
34323
- finalAttribute && this.target.setAttributes(finalAttribute), this.target.setAttributes(fromAttrs);
34338
+ finalAttribute && this.target.setAttributes(finalAttribute), !1 !== (null === (_c = this.params.controlOptions) || void 0 === _c ? void 0 : _c.immediatelyApply) && this.target.setAttributes(fromAttrs);
34324
34339
  }
34325
34340
  }
34326
34341
  class GrowRadiusOut extends GrowPointsBase {
@@ -34435,7 +34450,7 @@ class GrowWidthIn extends ACustomAnimate {
34435
34450
  super(from, to, duration, easing, params);
34436
34451
  }
34437
34452
  onBind() {
34438
- var _a, _b;
34453
+ var _a, _b, _c;
34439
34454
  super.onBind();
34440
34455
  const {
34441
34456
  from: from,
@@ -34444,7 +34459,7 @@ class GrowWidthIn extends ACustomAnimate {
34444
34459
  fromAttrs = null !== (_b = null === (_a = this.target.context) || void 0 === _a ? void 0 : _a.lastAttrs) && void 0 !== _b ? _b : from;
34445
34460
  this.props = to, this.propKeys = Object.keys(to).filter(key => null != to[key]), this.from = fromAttrs, this.to = to;
34446
34461
  const finalAttribute = this.target.getFinalAttribute();
34447
- finalAttribute && this.target.setAttributes(finalAttribute), this.target.setAttributes(fromAttrs);
34462
+ finalAttribute && this.target.setAttributes(finalAttribute), !1 !== (null === (_c = this.params.controlOptions) || void 0 === _c ? void 0 : _c.immediatelyApply) && this.target.setAttributes(fromAttrs);
34448
34463
  }
34449
34464
  onEnd(cb) {
34450
34465
  super.onEnd(cb);
@@ -49136,7 +49151,7 @@ function transformIndicatorStyle(style, datum) {
49136
49151
  }
49137
49152
  function transformToGraphic(style) {
49138
49153
  if (style === null || style === void 0 ? void 0 : style.angle) {
49139
- return Object.assign(Object.assign({}, style), { angle: degreeToRadian(style.angle) });
49154
+ style.angle = degreeToRadian(style.angle);
49140
49155
  }
49141
49156
  return style;
49142
49157
  }
@@ -49702,13 +49717,21 @@ class EventDispatcher {
49702
49717
  }
49703
49718
  return true;
49704
49719
  }
49720
+ _prepareParams(filter, params) {
49721
+ var _a, _b, _c;
49722
+ if (filter.markName && params.mark) {
49723
+ 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];
49724
+ return Object.assign(Object.assign({}, params), { item: markGraphic, datum: getDatumOfGraphic(markGraphic) });
49725
+ }
49726
+ return Object.assign({}, params);
49727
+ }
49705
49728
  _invoke(handlers, type, params) {
49706
49729
  const result = handlers.map(handler => {
49707
49730
  var _a, _b, _c;
49708
49731
  const filter = handler.filter;
49709
49732
  if (!handler.prevented && (!handler.query || this._filter(filter, type, params))) {
49710
49733
  const callback = handler.wrappedCallback || handler.callback;
49711
- const stopBubble = callback.call(null, Object.assign({}, params));
49734
+ const stopBubble = callback.call(null, this._prepareParams(filter, params));
49712
49735
  const doStopBubble = stopBubble !== null && stopBubble !== void 0 ? stopBubble : (_a = handler.query) === null || _a === void 0 ? void 0 : _a.consume;
49713
49736
  if (doStopBubble) {
49714
49737
  (_b = params.event) === null || _b === void 0 ? void 0 : _b.stopPropagation();
@@ -50238,7 +50261,7 @@ class Compiler {
50238
50261
  (_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 });
50239
50262
  };
50240
50263
  this._handleAfterNextRender = () => {
50241
- var _a, _b, _c, _d;
50264
+ var _a, _b;
50242
50265
  if (this._stage && !this._option.disableDirtyBounds) {
50243
50266
  this._stage.enableDirtyBounds();
50244
50267
  }
@@ -50248,7 +50271,6 @@ class Compiler {
50248
50271
  vchart: (_b = this._compileChart.getOption()) === null || _b === void 0 ? void 0 : _b.globalInstance
50249
50272
  });
50250
50273
  }
50251
- (_d = (_c = this._option.performanceHook) === null || _c === void 0 ? void 0 : _c.afterVRenderDraw) === null || _d === void 0 ? void 0 : _d.call(_c, this._compileChart.getOption().globalInstance);
50252
50274
  };
50253
50275
  this.handleProgressiveFrame = () => {
50254
50276
  if (this._progressiveMarks.length) {
@@ -50398,7 +50420,6 @@ class Compiler {
50398
50420
  });
50399
50421
  }
50400
50422
  _doRender(immediately) {
50401
- var _a, _b;
50402
50423
  if (this._stage) {
50403
50424
  this._rootMarks.forEach(g => {
50404
50425
  traverseGroupMark(g, m => {
@@ -50415,7 +50436,6 @@ class Compiler {
50415
50436
  this._stage.afterNextRender(this._handleAfterNextRender);
50416
50437
  if (immediately) {
50417
50438
  this._stage.render();
50418
- (_b = (_a = this._option.performanceHook) === null || _a === void 0 ? void 0 : _a.afterVRenderDraw) === null || _b === void 0 ? void 0 : _b.call(_a, this._compileChart.getOption().globalInstance);
50419
50439
  }
50420
50440
  }
50421
50441
  }
@@ -56921,7 +56941,7 @@ const lookup = (data, opt) => {
56921
56941
  });
56922
56942
  };
56923
56943
 
56924
- const version = "2.0.4-alpha.6";
56944
+ const version = "2.0.4-alpha.8";
56925
56945
 
56926
56946
  const addVChartProperty = (data, op) => {
56927
56947
  const context = op.beforeCall();
@@ -57670,7 +57690,7 @@ function traverseSpec(spec, transform, excludeKeys = []) {
57670
57690
  traverseSpec(spec[index], transform, excludeKeys);
57671
57691
  });
57672
57692
  }
57673
- else if (isObject$2(spec)) {
57693
+ else if (isObject$2(spec) && typeof spec !== 'function') {
57674
57694
  for (const key in spec) {
57675
57695
  if (!excludeKeys.includes(key)) {
57676
57696
  spec[key] = transform(spec[key], key);
@@ -84223,7 +84243,7 @@ class TreemapSeries extends CartesianSeries {
84223
84243
  });
84224
84244
  [this._labelMark, this._nonLeafLabelMark].forEach(m => {
84225
84245
  if (m && m.getComponent()) {
84226
- m.getComponent().getProduct().enableAnimation();
84246
+ m.getComponent().getProduct().getGroupGraphicItem().enableAnimation();
84227
84247
  }
84228
84248
  });
84229
84249
  this.event.off(HOOK_EVENT.AFTER_DO_RENDER, this._enableAnimationHook);
@@ -84233,7 +84253,7 @@ class TreemapSeries extends CartesianSeries {
84233
84253
  });
84234
84254
  [this._labelMark, this._nonLeafLabelMark].forEach(m => {
84235
84255
  if (m && m.getComponent()) {
84236
- m.getComponent().getProduct().disableAnimation();
84256
+ m.getComponent().getProduct().getGroupGraphicItem().disableAnimation();
84237
84257
  }
84238
84258
  });
84239
84259
  }
@@ -97101,13 +97121,14 @@ class CustomMark extends BaseComponent {
97101
97121
  getVRenderComponents() {
97102
97122
  const comps = [];
97103
97123
  const checkFunc = (m) => {
97124
+ var _a;
97104
97125
  if (m && m.type === "group") {
97105
97126
  m.getMarks().forEach(child => {
97106
97127
  checkFunc(child);
97107
97128
  });
97108
97129
  }
97109
97130
  else if (m.type === "component") {
97110
- const comp = m === null || m === void 0 ? void 0 : m.getComponent();
97131
+ const comp = (_a = m === null || m === void 0 ? void 0 : m.getProduct()) === null || _a === void 0 ? void 0 : _a.getGroupGraphicItem();
97111
97132
  if (comp) {
97112
97133
  comps.push(comp);
97113
97134
  }