fix(animations): retain trigger-state for nodes that are moved around (#24238)
This patch ensures that if a list of nodes (that contain animation triggers) are moved around then they will retain their trigger-value state when animated again at a later point. PR Close #24238
This commit is contained in:

committed by
Victor Berchet

parent
9367e91402
commit
8db928df9d
@ -104,7 +104,6 @@ export class StateValue {
|
||||
|
||||
export const VOID_VALUE = 'void';
|
||||
export const DEFAULT_STATE_VALUE = new StateValue(VOID_VALUE);
|
||||
export const DELETED_STATE_VALUE = new StateValue('DELETED');
|
||||
|
||||
export class AnimationTransitionNamespace {
|
||||
public players: TransitionAnimationPlayer[] = [];
|
||||
@ -208,8 +207,6 @@ export class AnimationTransitionNamespace {
|
||||
|
||||
if (!fromState) {
|
||||
fromState = DEFAULT_STATE_VALUE;
|
||||
} else if (fromState === DELETED_STATE_VALUE) {
|
||||
return player;
|
||||
}
|
||||
|
||||
const isRemoval = toState.value === VOID_VALUE;
|
||||
@ -773,10 +770,6 @@ export class TransitionAnimationEngine {
|
||||
}
|
||||
});
|
||||
}
|
||||
const stateMap = this.statesByElement.get(element);
|
||||
if (stateMap) {
|
||||
Object.keys(stateMap).forEach(triggerName => stateMap[triggerName] = DELETED_STATE_VALUE);
|
||||
}
|
||||
}
|
||||
|
||||
finishActiveQueriedAnimationOnElement(element: any) {
|
||||
|
Reference in New Issue
Block a user