diff --git a/packages/animations/browser/src/render/transition_animation_engine.ts b/packages/animations/browser/src/render/transition_animation_engine.ts index 205f6ecbba..4864388f53 100644 --- a/packages/animations/browser/src/render/transition_animation_engine.ts +++ b/packages/animations/browser/src/render/transition_animation_engine.ts @@ -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) { diff --git a/packages/core/test/animation/animation_integration_spec.ts b/packages/core/test/animation/animation_integration_spec.ts index a1dcb50b60..f94bca7d0c 100644 --- a/packages/core/test/animation/animation_integration_spec.ts +++ b/packages/core/test/animation/animation_integration_spec.ts @@ -2379,6 +2379,65 @@ const DEFAULT_COMPONENT_ID = '1'; }); }); }); + + it('should animate nodes properly when they have been re-ordered', () => { + @Component({ + selector: 'if-cmp', + template: ` +