mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 20:33:32 +08:00
fix(animation): reset all temporary flags when interrupting an animation (#20627)
fixes #20602
This commit is contained in:
@ -102,6 +102,18 @@ export const createAnimation = (animationId?: string): Animation => {
|
|||||||
cleanUpStyleSheets();
|
cleanUpStyleSheets();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const resetFlags = () => {
|
||||||
|
shouldForceLinearEasing = false;
|
||||||
|
shouldForceSyncPlayback = false;
|
||||||
|
shouldCalculateNumAnimations = true;
|
||||||
|
forceDirectionValue = undefined;
|
||||||
|
forceDurationValue = undefined;
|
||||||
|
forceDelayValue = undefined;
|
||||||
|
numAnimationsRunning = 0;
|
||||||
|
finished = false;
|
||||||
|
willComplete = true;
|
||||||
|
};
|
||||||
|
|
||||||
const onFinish = (callback: AnimationLifecycle, opts?: AnimationCallbackOptions) => {
|
const onFinish = (callback: AnimationLifecycle, opts?: AnimationCallbackOptions) => {
|
||||||
const callbacks = (opts && opts.oneTimeCallback) ? onFinishOneTimeCallbacks : onFinishCallbacks;
|
const callbacks = (opts && opts.oneTimeCallback) ? onFinishOneTimeCallbacks : onFinishCallbacks;
|
||||||
callbacks.push({ c: callback, o: opts });
|
callbacks.push({ c: callback, o: opts });
|
||||||
@ -886,6 +898,8 @@ export const createAnimation = (animationId?: string): Animation => {
|
|||||||
cleanUpElements();
|
cleanUpElements();
|
||||||
initialized = false;
|
initialized = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
resetFlags();
|
||||||
};
|
};
|
||||||
|
|
||||||
const from = (property: string, value: any) => {
|
const from = (property: string, value: any) => {
|
||||||
|
Reference in New Issue
Block a user