@visactor/vchart 2.1.2-alpha.0 → 2.1.2-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.
@@ -49,5 +49,4 @@ class AnimationPlanner {
49
49
  }
50
50
  }
51
51
 
52
- exports.AnimationPlanner = AnimationPlanner;
53
- //# sourceMappingURL=animation-planner.js.map
52
+ exports.AnimationPlanner = AnimationPlanner;
@@ -102,4 +102,5 @@ class GrammarDetector {
102
102
  }
103
103
  }
104
104
 
105
- exports.GrammarDetector = GrammarDetector;
105
+ exports.GrammarDetector = GrammarDetector;
106
+ //# sourceMappingURL=grammar-dector.js.map
@@ -11,4 +11,5 @@ exports.ARC_START_ANGLE = `${base_1.PREFIX}_ARC_START_ANGLE`, exports.ARC_END_AN
11
11
  exports.ARC_K = `${base_1.PREFIX}_ARC_K`, exports.ARC_MIDDLE_ANGLE = `${base_1.PREFIX}_ARC_MIDDLE_ANGLE`,
12
12
  exports.ARC_QUADRANT = `${base_1.PREFIX}_ARC_QUADRANT`, exports.ARC_RADIAN = `${base_1.PREFIX}_ARC_RADIAN`,
13
13
  exports.POLAR_START_RADIAN = -Math.PI / 2, exports.POLAR_END_RADIAN = 3 * Math.PI / 2,
14
- exports.POLAR_START_ANGLE = -90, exports.POLAR_END_ANGLE = 270, exports.POLAR_DEFAULT_RADIUS = .6;
14
+ exports.POLAR_START_ANGLE = -90, exports.POLAR_END_ANGLE = 270, exports.POLAR_DEFAULT_RADIUS = .6;
15
+ //# sourceMappingURL=polar.js.map
@@ -2,5 +2,4 @@
2
2
 
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: !0
5
- }), exports.SCROLL_BAR_DEFAULT_SIZE = void 0, exports.SCROLL_BAR_DEFAULT_SIZE = 12;
6
- //# sourceMappingURL=scroll-bar.js.map
5
+ }), exports.SCROLL_BAR_DEFAULT_SIZE = void 0, exports.SCROLL_BAR_DEFAULT_SIZE = 12;
@@ -167,6 +167,7 @@ export declare class BaseMark<T extends ICommonSpec> extends GrammarItem impleme
167
167
  protected _runEncoder(graphics: IMarkGraphic[], noGroupEncode?: boolean): void;
168
168
  protected _excludeStateControlledDiffAttrs(g: IMarkGraphic, diffAttrs: Record<string, any>): Record<string, any>;
169
169
  protected _hasDiffAttrs(g: IMarkGraphic): boolean;
170
+ protected _commitPreventedAnimationStaticAttrs(g: IMarkGraphic, attrs: Record<string, any>): void;
170
171
  protected _runApplyGraphic(graphics: IMarkGraphic[]): void;
171
172
  protected _updateEncoderByState(): void;
172
173
  protected _runState(graphics: IMarkGraphic[]): void;
@@ -725,6 +725,13 @@ class BaseMark extends grammar_item_1.GrammarItem {
725
725
  _hasDiffAttrs(g) {
726
726
  return !!g.context.diffAttrs && Object.keys(g.context.diffAttrs).length > 0;
727
727
  }
728
+ _commitPreventedAnimationStaticAttrs(g, attrs) {
729
+ var _a, _b;
730
+ if (!attrs || !Object.keys(attrs).length) return;
731
+ const graphic = g;
732
+ null === (_a = graphic.setFinalAttributes) || void 0 === _a || _a.call(graphic, attrs),
733
+ graphic._commitAnimationStaticAttributes ? graphic._commitAnimationStaticAttributes(attrs) : null === (_b = graphic.commitInternalBaseAttributes) || void 0 === _b || _b.call(graphic, attrs);
734
+ }
728
735
  _runApplyGraphic(graphics) {
729
736
  const hasAnimation = this.hasAnimation();
730
737
  graphics.forEach(((g, index) => {
@@ -733,7 +740,8 @@ class BaseMark extends grammar_item_1.GrammarItem {
733
740
  if (g.setAttributes) {
734
741
  const diffAttrs = this._excludeStateControlledDiffAttrs(g, (0, mark_2.getDiffAttributesOfGraphic)(g, finalAttrs));
735
742
  g.context.diffAttrs = diffAttrs, g.context.reusing ? (g.context.lastAttrs = g.attribute,
736
- g.initAttributes(finalAttrs), g.context.reusing = !1) : hasStateAnimation || (hasAnimation ? g.setAttributesAndPreventAnimate(diffAttrs) : g.setAttributes(diffAttrs)),
743
+ g.initAttributes(finalAttrs), g.context.reusing = !1) : hasStateAnimation || (hasAnimation ? (g.setAttributesAndPreventAnimate(diffAttrs),
744
+ this._commitPreventedAnimationStaticAttrs(g, diffAttrs)) : g.setAttributes(diffAttrs)),
737
745
  !(null === (_b = this.renderContext) || void 0 === _b ? void 0 : _b.progressive) && this._product && g.parent !== this._product && this._product.appendChild(g);
738
746
  } else {
739
747
  const mockGraphic = g;