Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Allow animating moving item before they are beeing moved #14984

Open
matthieusieben opened this issue Aug 4, 2016 · 2 comments
Open

Allow animating moving item before they are beeing moved #14984

matthieusieben opened this issue Aug 4, 2016 · 2 comments

Comments

@matthieusieben
Copy link

matthieusieben commented Aug 4, 2016

Do you want to request a feature or report a bug?
feature

What is the current behavior?
when using ngAnimate's move feature in ngRepeat directives, the ng-move-* classes are only applied to the element once it was moved.

What is the expected behavior?
It would be nice to have a better control over the animation of elements before they move, for example by having: ng-move-leave(-active)? & ng-move-enter(-active)? classes.

Not sure if the ng-move-enter animation should wait for the ng-move-leave animation to finish or if both animations should be simultaneous. I guess a css's transition-delay may be the answer to this.

What is the motivation / use case for changing the behavior?
Allow fading out element when they are being moved, instead of them suddenly disappearing from one place, and appearing nicely in another.

Which versions of Angular, and which browser / OS are affected by this issue?
Angular 1.5.8
Chrome 52

@pondermatic
Copy link

pondermatic commented Sep 5, 2016

+1
I would like this feature as well. Moved items should transition smoothly and not jump into their new position. Animating a position change would be difficult. Fading a moved item out from it's previous position and fading it up in its next position sounds plausible.

This feature was the motivation behind issue #15068. Here is a plunker with the revised ngRepeat code.

@pondermatic
Copy link

Perhaps when ngRepeat performs actions on the collection, all items that need to enter or leave should wait until all moved items have finished animating?

@petebacondarwin petebacondarwin modified the milestones: Backlog, Backlog2 Oct 17, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants