@visactor/vchart-extension 2.0.4-alpha.1 → 2.0.4-alpha.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.
package/build/index.js CHANGED
@@ -7015,8 +7015,7 @@
7015
7015
  y1: 0,
7016
7016
  strokeBoundsBuffer: 0,
7017
7017
  cornerRadius: 0,
7018
- cornerType: "round",
7019
- drawStrokeWhenZeroWH: !1
7018
+ cornerType: "round"
7020
7019
  });
7021
7020
  Object.assign(Object.assign({}, DefaultAttribute), {
7022
7021
  width: 0,
@@ -7025,8 +7024,7 @@
7025
7024
  y1: 0,
7026
7025
  cornerRadius: 0,
7027
7026
  length: 0,
7028
- cornerType: "round",
7029
- drawStrokeWhenZeroWH: !1
7027
+ cornerType: "round"
7030
7028
  });
7031
7029
  const DefaultSymbolAttribute = Object.assign(Object.assign({}, DefaultAttribute), {
7032
7030
  symbolType: "circle",
@@ -10221,7 +10219,7 @@
10221
10219
  });
10222
10220
  }
10223
10221
  setAttributes(params, forceUpdateTag = !1, context) {
10224
- 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));
10222
+ (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);
10225
10223
  }
10226
10224
  _setAttributes(params, forceUpdateTag = !1, context) {
10227
10225
  const keys = Object.keys(params);
@@ -10856,8 +10854,8 @@
10856
10854
  function strokeVisible(opacity, strokeOpacity) {
10857
10855
  return opacity * strokeOpacity > 0;
10858
10856
  }
10859
- function rectStrokeVisible(opacity, strokeOpacity, width, height, drawStrokeWhenZeroWH) {
10860
- return drawStrokeWhenZeroWH ? opacity * strokeOpacity > 0 : opacity * strokeOpacity > 0 && 0 !== width && 0 !== height;
10857
+ function rectStrokeVisible(opacity, strokeOpacity, width, height) {
10858
+ return opacity * strokeOpacity > 0 && 0 !== width && 0 !== height;
10861
10859
  }
10862
10860
  function intersect(x0, y0, x1, y1, x2, y2, x3, y3) {
10863
10861
  const x10 = x1 - x0,
@@ -14923,8 +14921,7 @@
14923
14921
  y1: y1,
14924
14922
  x: originX = rectAttribute.x,
14925
14923
  y: originY = rectAttribute.y,
14926
- fillStrokeOrder = rectAttribute.fillStrokeOrder,
14927
- drawStrokeWhenZeroWH = rectAttribute.drawStrokeWhenZeroWH
14924
+ fillStrokeOrder = rectAttribute.fillStrokeOrder
14928
14925
  } = rect.attribute;
14929
14926
  let {
14930
14927
  width: width,
@@ -14932,7 +14929,7 @@
14932
14929
  } = rect.attribute;
14933
14930
  width = (null != width ? width : x1 - originX) || 0, height = (null != height ? height : y1 - originY) || 0;
14934
14931
  const fVisible = rectFillVisible(opacity, fillOpacity, width, height, fill),
14935
- sVisible = rectStrokeVisible(opacity, strokeOpacity, width, height, drawStrokeWhenZeroWH),
14932
+ sVisible = rectStrokeVisible(opacity, strokeOpacity, width, height),
14936
14933
  doFill = runFill(fill, background),
14937
14934
  doStroke = runStroke(stroke, lineWidth);
14938
14935
  if (!rect.valid || !visible) return;
@@ -15836,7 +15833,7 @@
15836
15833
  super(...arguments), this.type = "rect3d", this.numberType = RECT3D_NUMBER_TYPE;
15837
15834
  }
15838
15835
  drawShape(rect, context, x, y, drawContext, params, fillCb, strokeCb) {
15839
- var _a, _b;
15836
+ var _a;
15840
15837
  const rectAttribute = getTheme(rect, null == params ? void 0 : params.theme).rect,
15841
15838
  {
15842
15839
  fill = rectAttribute.fill,
@@ -15849,17 +15846,16 @@
15849
15846
  fillOpacity = rectAttribute.fillOpacity,
15850
15847
  lineWidth = rectAttribute.lineWidth,
15851
15848
  strokeOpacity = rectAttribute.strokeOpacity,
15852
- visible = rectAttribute.visible,
15853
- drawStrokeWhenZeroWH = null !== (_a = rectAttribute.drawStrokeWhenZeroWH) && void 0 !== _a && _a
15849
+ visible = rectAttribute.visible
15854
15850
  } = rect.attribute;
15855
15851
  let {
15856
15852
  width: width,
15857
15853
  height: height
15858
15854
  } = rect.attribute;
15859
15855
  width = (null != width ? width : x1 - originX) || 0, height = (null != height ? height : y1 - originY) || 0;
15860
- const z = null !== (_b = this.z) && void 0 !== _b ? _b : 0,
15856
+ const z = null !== (_a = this.z) && void 0 !== _a ? _a : 0,
15861
15857
  fVisible = rectFillVisible(opacity, fillOpacity, width, height, fill),
15862
- sVisible = rectStrokeVisible(opacity, strokeOpacity, width, height, drawStrokeWhenZeroWH),
15858
+ sVisible = rectStrokeVisible(opacity, strokeOpacity, width, height),
15863
15859
  doFill = runFill(fill),
15864
15860
  doStroke = runStroke(stroke, lineWidth);
15865
15861
  if (!rect.valid || !visible) return;
@@ -17852,7 +17848,6 @@
17852
17848
  return this.getEndProps();
17853
17849
  }
17854
17850
  stop() {}
17855
- release() {}
17856
17851
  }
17857
17852
  class WaitStep extends Step {
17858
17853
  constructor(type, props, duration, easing) {
@@ -18070,9 +18065,7 @@
18070
18065
  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));
18071
18066
  }
18072
18067
  release() {
18073
- this.status = AnimateStatus.END, this._onRemove && this._onRemove.forEach(cb => cb()), this._onStart = [], this._onFrame = [], this._onEnd = [], this._onRemove = [], this.forEachStep(step => {
18074
- step.release();
18075
- });
18068
+ this.status = AnimateStatus.END, this._onRemove && this._onRemove.forEach(cb => cb()), this._onStart = [], this._onFrame = [], this._onEnd = [], this._onRemove = [];
18076
18069
  }
18077
18070
  getDuration() {
18078
18071
  return this._duration;
@@ -18146,10 +18139,6 @@
18146
18139
  getLoop() {
18147
18140
  return this._loopCount;
18148
18141
  }
18149
- forEachStep(cb) {
18150
- let step = this._firstStep;
18151
- for (; step;) cb(step), step = step.next;
18152
- }
18153
18142
  }
18154
18143
 
18155
18144
  const performanceRAF = new PerformanceRAF();
@@ -18382,9 +18371,6 @@
18382
18371
  constructor(target) {
18383
18372
  this._animates = [], this._startCallbacks = [], this._endCallbacks = [], this._started = !1, this._activeCount = 0, this._target = target;
18384
18373
  }
18385
- get started() {
18386
- return this._started;
18387
- }
18388
18374
  onStart(cb) {
18389
18375
  cb ? (this._startCallbacks.push(cb), this._started && this._activeCount > 0 && cb()) : this._startCallbacks.forEach(cb => {
18390
18376
  cb();
@@ -18525,14 +18511,14 @@
18525
18511
  return delayAfterValue > 0 && (totalDelay += delayAfterValue), totalDelay > 0 && animate.wait(totalDelay), loop && loop > 0 && animate.loop(loop), bounce && animate.bounce(!0), animate;
18526
18512
  }
18527
18513
  _handleRunAnimate(animate, custom, customType, from, props, duration, easing, customParameters, controlOptions, options, type, graphic) {
18528
- var _a, _b, _c, _d, _e, _f;
18514
+ var _a, _b, _c, _d;
18529
18515
  if (custom && customType) {
18530
18516
  const customParams = Object.assign({
18531
- width: (null === (_a = graphic.stage) || void 0 === _a ? void 0 : _a.width) || 0,
18532
- height: (null === (_b = graphic.stage) || void 0 === _b ? void 0 : _b.height) || 0,
18517
+ width: graphic.stage.width,
18518
+ height: graphic.stage.height,
18533
18519
  group: this._target.parent
18534
18520
  }, this.resolveValue(customParameters, graphic)),
18535
- 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;
18521
+ 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;
18536
18522
  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);
18537
18523
  } else "to" === type ? animate.to(props, duration, easing) : "from" === type && animate.from(props, duration, easing);
18538
18524
  }
@@ -18752,7 +18738,7 @@
18752
18738
  reApplyState(state) {
18753
18739
  var _a;
18754
18740
  const stateInfo = null === (_a = this.stateList) || void 0 === _a ? void 0 : _a.find(stateInfo => stateInfo.state === state);
18755
- if (stateInfo && stateInfo.executor.started) {
18741
+ if (stateInfo) {
18756
18742
  const stateList = this.stateList.slice();
18757
18743
  stateInfo.executor.stop(), this.stateList = stateList, stateInfo.executor.execute(stateInfo.animationConfig);
18758
18744
  }