fix(animations): retain styling when transition destinations are changed (#12208)
Closes #9661 Closes #12208
This commit is contained in:

committed by
Victor Berchet

parent
46023e4792
commit
9de76ebfa5
@ -88,7 +88,7 @@ export class AnimationGroupPlayer implements AnimationPlayer {
|
||||
this._started = false;
|
||||
}
|
||||
|
||||
setPosition(p: any /** TODO #9100 */): void {
|
||||
setPosition(p: number): void {
|
||||
this._players.forEach(player => { player.setPosition(p); });
|
||||
}
|
||||
|
||||
@ -100,4 +100,6 @@ export class AnimationGroupPlayer implements AnimationPlayer {
|
||||
});
|
||||
return min;
|
||||
}
|
||||
|
||||
get players(): AnimationPlayer[] { return this._players; }
|
||||
}
|
||||
|
@ -56,6 +56,6 @@ export class NoOpAnimationPlayer implements AnimationPlayer {
|
||||
finish(): void { this._onFinish(); }
|
||||
destroy(): void {}
|
||||
reset(): void {}
|
||||
setPosition(p: any /** TODO #9100 */): void {}
|
||||
setPosition(p: number): void {}
|
||||
getPosition(): number { return 0; }
|
||||
}
|
||||
|
@ -104,7 +104,9 @@ export class AnimationSequencePlayer implements AnimationPlayer {
|
||||
}
|
||||
}
|
||||
|
||||
setPosition(p: any /** TODO #9100 */): void { this._players[0].setPosition(p); }
|
||||
setPosition(p: number): void { this._players[0].setPosition(p); }
|
||||
|
||||
getPosition(): number { return this._players[0].getPosition(); }
|
||||
|
||||
get players(): AnimationPlayer[] { return this._players; }
|
||||
}
|
||||
|
@ -84,6 +84,8 @@ export function balanceAnimationKeyframes(
|
||||
firstKeyframe.styles.styles.push(extraFirstKeyframeStyles);
|
||||
}
|
||||
|
||||
collectAndResolveStyles(collectedStyles, [finalStateStyles]);
|
||||
|
||||
return keyframes;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user