@visactor/vchart 2.0.12-alpha.3 → 2.0.12-alpha.5

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
@@ -26573,9 +26573,11 @@ class Gesture extends EventEmitter {
26573
26573
  }
26574
26574
  emitEvent(type, e) {
26575
26575
  if (!this.element) return;
26576
- const listeners = this.element._events[WILDCARD];
26576
+ const events = this.element._events;
26577
+ this._callListeners(type, e, events[WILDCARD]), this._callListeners(type, e, events[type]), this.emit(type, e);
26578
+ }
26579
+ _callListeners(type, e, listeners) {
26577
26580
  if (listeners) if ("fn" in listeners) listeners.fn.call(listeners.context, e, type);else for (let i = 0, j = listeners.length; i < j && !e.propagationImmediatelyStopped; i++) listeners[i].fn.call(listeners[i].context, e, type);
26578
- this.emit(type, e);
26579
26581
  }
26580
26582
  }
26581
26583
 
@@ -35126,7 +35128,15 @@ class AnimationTransitionRegistry {
35126
35128
  AnimationTransitionRegistry.getInstance();
35127
35129
 
35128
35130
  function getCustomType(custom) {
35129
- return custom && isFunction$1(custom) ? /^class\s/.test(Function.prototype.toString.call(custom)) ? 1 : 2 : 0;
35131
+ if (!custom || !isFunction$1(custom)) return 0;
35132
+ const functionStr = Function.prototype.toString.call(custom);
35133
+ if (/^class\s/.test(functionStr)) return 1;
35134
+ if (!custom.prototype) return 2;
35135
+ if (custom.prototype.constructor === custom) {
35136
+ const descriptor = Object.getOwnPropertyDescriptor(custom, "prototype");
35137
+ if (descriptor && !descriptor.writable) return 1;
35138
+ }
35139
+ return 2;
35130
35140
  }
35131
35141
 
35132
35142
  class AnimateExecutor {
@@ -78982,7 +78992,7 @@ class PolarAxis extends AxisComponent {
78982
78992
  return this._startAngle;
78983
78993
  }
78984
78994
  _layoutAngleAxis() {
78985
- var _a, _b, _c;
78995
+ var _a, _b, _c, _d, _e;
78986
78996
  const center = this.getCenter();
78987
78997
  const radius = this.computeLayoutOuterRadius();
78988
78998
  const innerRadius = this.computeLayoutInnerRadius();
@@ -78990,7 +79000,7 @@ class PolarAxis extends AxisComponent {
78990
79000
  const items = this.getLabelItems(angleRange);
78991
79001
  const commonAttrs = Object.assign(Object.assign({}, this.getLayoutStartPoint()), { inside: this._spec.inside, center,
78992
79002
  radius,
78993
- innerRadius, startAngle: this._startAngle, endAngle: this._endAngle, sides: ((_c = (_b = (_a = this._getRelatedAxis(this._option.radiusAxisIndex)) === null || _a === void 0 ? void 0 : _a.getSpec()) === null || _b === void 0 ? void 0 : _b.grid) === null || _c === void 0 ? void 0 : _c.smooth)
79003
+ innerRadius, startAngle: this._startAngle, endAngle: this._endAngle, layoutRect: this.getRefLayoutRect(), autoLabelMaxWidth: (_b = (_a = this._spec.label) === null || _a === void 0 ? void 0 : _a.autoLabelMaxWidth) !== null && _b !== void 0 ? _b : false, sides: ((_e = (_d = (_c = this._getRelatedAxis(this._option.radiusAxisIndex)) === null || _c === void 0 ? void 0 : _c.getSpec()) === null || _d === void 0 ? void 0 : _d.grid) === null || _e === void 0 ? void 0 : _e.smooth)
78994
79004
  ? undefined
78995
79005
  : this.getScale().domain().length });
78996
79006
  const attrs = Object.assign(Object.assign({}, commonAttrs), { size: this.getRefLayoutRect(), title: {
package/build/index.js CHANGED
@@ -26579,9 +26579,11 @@
26579
26579
  }
26580
26580
  emitEvent(type, e) {
26581
26581
  if (!this.element) return;
26582
- const listeners = this.element._events[WILDCARD];
26582
+ const events = this.element._events;
26583
+ this._callListeners(type, e, events[WILDCARD]), this._callListeners(type, e, events[type]), this.emit(type, e);
26584
+ }
26585
+ _callListeners(type, e, listeners) {
26583
26586
  if (listeners) if ("fn" in listeners) listeners.fn.call(listeners.context, e, type);else for (let i = 0, j = listeners.length; i < j && !e.propagationImmediatelyStopped; i++) listeners[i].fn.call(listeners[i].context, e, type);
26584
- this.emit(type, e);
26585
26587
  }
26586
26588
  }
26587
26589
 
@@ -35132,7 +35134,15 @@
35132
35134
  AnimationTransitionRegistry.getInstance();
35133
35135
 
35134
35136
  function getCustomType(custom) {
35135
- return custom && isFunction$1(custom) ? /^class\s/.test(Function.prototype.toString.call(custom)) ? 1 : 2 : 0;
35137
+ if (!custom || !isFunction$1(custom)) return 0;
35138
+ const functionStr = Function.prototype.toString.call(custom);
35139
+ if (/^class\s/.test(functionStr)) return 1;
35140
+ if (!custom.prototype) return 2;
35141
+ if (custom.prototype.constructor === custom) {
35142
+ const descriptor = Object.getOwnPropertyDescriptor(custom, "prototype");
35143
+ if (descriptor && !descriptor.writable) return 1;
35144
+ }
35145
+ return 2;
35136
35146
  }
35137
35147
 
35138
35148
  class AnimateExecutor {
@@ -78988,7 +78998,7 @@
78988
78998
  return this._startAngle;
78989
78999
  }
78990
79000
  _layoutAngleAxis() {
78991
- var _a, _b, _c;
79001
+ var _a, _b, _c, _d, _e;
78992
79002
  const center = this.getCenter();
78993
79003
  const radius = this.computeLayoutOuterRadius();
78994
79004
  const innerRadius = this.computeLayoutInnerRadius();
@@ -78996,7 +79006,7 @@
78996
79006
  const items = this.getLabelItems(angleRange);
78997
79007
  const commonAttrs = Object.assign(Object.assign({}, this.getLayoutStartPoint()), { inside: this._spec.inside, center,
78998
79008
  radius,
78999
- innerRadius, startAngle: this._startAngle, endAngle: this._endAngle, sides: ((_c = (_b = (_a = this._getRelatedAxis(this._option.radiusAxisIndex)) === null || _a === void 0 ? void 0 : _a.getSpec()) === null || _b === void 0 ? void 0 : _b.grid) === null || _c === void 0 ? void 0 : _c.smooth)
79009
+ innerRadius, startAngle: this._startAngle, endAngle: this._endAngle, layoutRect: this.getRefLayoutRect(), autoLabelMaxWidth: (_b = (_a = this._spec.label) === null || _a === void 0 ? void 0 : _a.autoLabelMaxWidth) !== null && _b !== void 0 ? _b : false, sides: ((_e = (_d = (_c = this._getRelatedAxis(this._option.radiusAxisIndex)) === null || _c === void 0 ? void 0 : _c.getSpec()) === null || _d === void 0 ? void 0 : _d.grid) === null || _e === void 0 ? void 0 : _e.smooth)
79000
79010
  ? undefined
79001
79011
  : this.getScale().domain().length });
79002
79012
  const attrs = Object.assign(Object.assign({}, commonAttrs), { size: this.getRefLayoutRect(), title: {