@visactor/vchart 2.0.12-alpha.2 → 2.0.12-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
@@ -35126,7 +35126,15 @@ class AnimationTransitionRegistry {
35126
35126
  AnimationTransitionRegistry.getInstance();
35127
35127
 
35128
35128
  function getCustomType(custom) {
35129
- return custom && isFunction$1(custom) ? /^class\s/.test(Function.prototype.toString.call(custom)) ? 1 : 2 : 0;
35129
+ if (!custom || !isFunction$1(custom)) return 0;
35130
+ const functionStr = Function.prototype.toString.call(custom);
35131
+ if (/^class\s/.test(functionStr)) return 1;
35132
+ if (!custom.prototype) return 2;
35133
+ if (custom.prototype.constructor === custom) {
35134
+ const descriptor = Object.getOwnPropertyDescriptor(custom, "prototype");
35135
+ if (descriptor && !descriptor.writable) return 1;
35136
+ }
35137
+ return 2;
35130
35138
  }
35131
35139
 
35132
35140
  class AnimateExecutor {
@@ -35281,6 +35289,7 @@ class AnimateExecutor {
35281
35289
  _handleRunAnimate(animate, custom, customType, from, props, duration, easing, customParameters, controlOptions, options, type, graphic) {
35282
35290
  var _a, _b, _c, _d, _e, _f, _g, _h;
35283
35291
  if (custom && customType) {
35292
+ customType = getCustomType(custom);
35284
35293
  let customParams = this.resolveValue(customParameters, graphic);
35285
35294
  "function" == typeof customParams && (customParams = customParams(null === (_b = null === (_a = graphic.context) || void 0 === _a ? void 0 : _a.data) || void 0 === _b ? void 0 : _b[0], graphic, {})), customParams = Object.assign({
35286
35295
  width: (null === (_c = graphic.stage) || void 0 === _c ? void 0 : _c.width) || 0,
package/build/index.js CHANGED
@@ -35132,7 +35132,15 @@
35132
35132
  AnimationTransitionRegistry.getInstance();
35133
35133
 
35134
35134
  function getCustomType(custom) {
35135
- return custom && isFunction$1(custom) ? /^class\s/.test(Function.prototype.toString.call(custom)) ? 1 : 2 : 0;
35135
+ if (!custom || !isFunction$1(custom)) return 0;
35136
+ const functionStr = Function.prototype.toString.call(custom);
35137
+ if (/^class\s/.test(functionStr)) return 1;
35138
+ if (!custom.prototype) return 2;
35139
+ if (custom.prototype.constructor === custom) {
35140
+ const descriptor = Object.getOwnPropertyDescriptor(custom, "prototype");
35141
+ if (descriptor && !descriptor.writable) return 1;
35142
+ }
35143
+ return 2;
35136
35144
  }
35137
35145
 
35138
35146
  class AnimateExecutor {
@@ -35287,6 +35295,7 @@
35287
35295
  _handleRunAnimate(animate, custom, customType, from, props, duration, easing, customParameters, controlOptions, options, type, graphic) {
35288
35296
  var _a, _b, _c, _d, _e, _f, _g, _h;
35289
35297
  if (custom && customType) {
35298
+ customType = getCustomType(custom);
35290
35299
  let customParams = this.resolveValue(customParameters, graphic);
35291
35300
  "function" == typeof customParams && (customParams = customParams(null === (_b = null === (_a = graphic.context) || void 0 === _a ? void 0 : _a.data) || void 0 === _b ? void 0 : _b[0], graphic, {})), customParams = Object.assign({
35292
35301
  width: (null === (_c = graphic.stage) || void 0 === _c ? void 0 : _c.width) || 0,