@visactor/vchart 2.1.5-alpha.1 → 2.1.5-alpha.2
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/es5/index.js +1 -1
- package/build/index.js +27 -18
- package/build/index.min.js +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/package.json +10 -10
package/build/index.js
CHANGED
|
@@ -15707,6 +15707,11 @@
|
|
|
15707
15707
|
}
|
|
15708
15708
|
return !0;
|
|
15709
15709
|
}
|
|
15710
|
+
hasStatePatch(patch) {
|
|
15711
|
+
if (!patch) return !1;
|
|
15712
|
+
for (const key in patch) if (Object.prototype.hasOwnProperty.call(patch, key)) return !0;
|
|
15713
|
+
return !1;
|
|
15714
|
+
}
|
|
15710
15715
|
commitSameStatePatchRefresh(states, hasAnimation, animateSameStatePatchChange = !1) {
|
|
15711
15716
|
var _a;
|
|
15712
15717
|
const previousStates = null !== (_a = this.currentStates) && void 0 !== _a ? _a : EMPTY_STATE_NAMES,
|
|
@@ -15774,15 +15779,17 @@
|
|
|
15774
15779
|
transition = this.resolveClearStatesTransition();
|
|
15775
15780
|
if (!transition.changed && 0 === previousStates.length) return this.currentStates = [], this.effectiveStates = [], this.resolvedStatePatch = void 0, this.sharedStateDirty = !1, void this.clearSharedStateActiveRegistrations();
|
|
15776
15781
|
const resolvedStateAttrs = hasAnimation || this.hasCustomEvent("beforeStateUpdate") ? cloneAttributeValue(null !== (_b = this.baseAttributes) && void 0 !== _b ? _b : {}) : null !== (_c = this.baseAttributes) && void 0 !== _c ? _c : {};
|
|
15777
|
-
if (!transition.changed || this.beforeStateUpdate(resolvedStateAttrs, previousStates, transition.states, hasAnimation, !0)) if (this.currentStates = transition.states, this.effectiveStates = [], this.resolvedStatePatch = void 0, this.sharedStateDirty = !1, this.clearSharedStateActiveRegistrations(),
|
|
15778
|
-
|
|
15779
|
-
|
|
15780
|
-
|
|
15781
|
-
|
|
15782
|
-
|
|
15783
|
-
|
|
15784
|
-
|
|
15785
|
-
|
|
15782
|
+
if (!transition.changed || this.beforeStateUpdate(resolvedStateAttrs, previousStates, transition.states, hasAnimation, !0)) if (this.currentStates = transition.states, this.effectiveStates = [], this.resolvedStatePatch = void 0, this.sharedStateDirty = !1, this.clearSharedStateActiveRegistrations(), this.attributeMayContainTransientAttrs || this.hasStatePatch(previousResolvedStatePatch)) {
|
|
15783
|
+
if (hasAnimation) {
|
|
15784
|
+
this._syncFinalAttributeFromStaticTruth();
|
|
15785
|
+
const removedStateAnimationAttrs = this.buildRemovedStateAnimationAttrs(resolvedStateAttrs, previousResolvedStatePatch);
|
|
15786
|
+
this.applyStateAttrs(resolvedStateAttrs, transition.states, hasAnimation, !0, void 0, null == removedStateAnimationAttrs ? void 0 : removedStateAnimationAttrs.extraAttrs, null == removedStateAnimationAttrs ? void 0 : removedStateAnimationAttrs.stateTransitionTargetAttrs);
|
|
15787
|
+
} else this.stopStateAnimates(), this.attributeMayContainTransientAttrs ? this._restoreAttributeFromStaticTruth({
|
|
15788
|
+
type: AttributeUpdateType.STATE
|
|
15789
|
+
}) : this.restoreAttributeFromStatePatchDelta(previousResolvedStatePatch, void 0, {
|
|
15790
|
+
type: AttributeUpdateType.STATE
|
|
15791
|
+
}), this.emitStateUpdateEvent();
|
|
15792
|
+
} else this.emitStateUpdateEvent();
|
|
15786
15793
|
}
|
|
15787
15794
|
removeState(stateName, hasAnimation) {
|
|
15788
15795
|
const transition = this.resolveRemoveStateTransition(stateName);
|
|
@@ -15823,15 +15830,17 @@
|
|
|
15823
15830
|
effectiveStates: effectiveStates,
|
|
15824
15831
|
resolvedStateAttrs: resolvedStateAttrs
|
|
15825
15832
|
} = this.resolveGraphicStateTransition(states);
|
|
15826
|
-
if ((transition.changed || !this.sameStateNames(previousStates, transition.states)) && this.beforeStateUpdate(resolvedStateAttrs, previousStates, transition.states, hasAnimation, !1)) if (this.currentStates = transition.states, this.effectiveStates = [...effectiveStates], this.resolvedStatePatch = resolvedStateAttrs, this.sharedStateDirty = !1, this.syncSharedStateActiveRegistrations(),
|
|
15827
|
-
|
|
15828
|
-
|
|
15829
|
-
|
|
15830
|
-
|
|
15831
|
-
|
|
15832
|
-
|
|
15833
|
-
|
|
15834
|
-
|
|
15833
|
+
if ((transition.changed || !this.sameStateNames(previousStates, transition.states)) && this.beforeStateUpdate(resolvedStateAttrs, previousStates, transition.states, hasAnimation, !1)) if (this.currentStates = transition.states, this.effectiveStates = [...effectiveStates], this.resolvedStatePatch = resolvedStateAttrs, this.sharedStateDirty = !1, this.syncSharedStateActiveRegistrations(), this.attributeMayContainTransientAttrs || this.hasStatePatch(previousResolvedStatePatch) || this.hasStatePatch(resolvedStateAttrs)) {
|
|
15834
|
+
if (hasAnimation) {
|
|
15835
|
+
this._syncFinalAttributeFromStaticTruth();
|
|
15836
|
+
const removedStateAnimationAttrs = this.buildRemovedStateAnimationAttrs(resolvedStateAttrs, previousResolvedStatePatch);
|
|
15837
|
+
this.applyStateAttrs(resolvedStateAttrs, transition.states, hasAnimation, !1, void 0, null == removedStateAnimationAttrs ? void 0 : removedStateAnimationAttrs.extraAttrs, null == removedStateAnimationAttrs ? void 0 : removedStateAnimationAttrs.stateTransitionTargetAttrs);
|
|
15838
|
+
} else this.stopStateAnimates(), this.attributeMayContainTransientAttrs ? this._restoreAttributeFromStaticTruth({
|
|
15839
|
+
type: AttributeUpdateType.STATE
|
|
15840
|
+
}) : this.restoreAttributeFromStatePatchDelta(previousResolvedStatePatch, this.resolvedStatePatch, {
|
|
15841
|
+
type: AttributeUpdateType.STATE
|
|
15842
|
+
}), this.emitStateUpdateEvent();
|
|
15843
|
+
} else this.emitStateUpdateEvent();
|
|
15835
15844
|
}
|
|
15836
15845
|
invalidateResolver() {
|
|
15837
15846
|
var _a, _b;
|