mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
fix(animations): always fire inner trigger callbacks even if blocked by parent animations (#19753)
Closes #19100 PR Close #19753
This commit is contained in:
committed by
Tobias Bosch
parent
41f57affb6
commit
5a9ed2de27
@@ -140,4 +140,11 @@ export class AnimationGroupPlayer implements AnimationPlayer {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/* @internal */
|
||||
triggerCallback(phaseName: string): void {
|
||||
const methods = phaseName == 'start' ? this._onStartFns : this._onDoneFns;
|
||||
methods.forEach(fn => fn());
|
||||
methods.length = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,6 +31,8 @@ export interface AnimationPlayer {
|
||||
parentPlayer: AnimationPlayer|null;
|
||||
readonly totalTime: number;
|
||||
beforeDestroy?: () => any;
|
||||
/* @internal */
|
||||
triggerCallback?: (phaseName: string) => void;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -91,4 +93,11 @@ export class NoopAnimationPlayer implements AnimationPlayer {
|
||||
reset(): void {}
|
||||
setPosition(p: number): void {}
|
||||
getPosition(): number { return 0; }
|
||||
}
|
||||
|
||||
/* @internal */
|
||||
triggerCallback(phaseName: string): void {
|
||||
const methods = phaseName == 'start' ? this._onStartFns : this._onDoneFns;
|
||||
methods.forEach(fn => fn());
|
||||
methods.length = 0;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user