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

ngAnimate does not support animation-iteration-count, animation-direction, etc. yet #3034

Closed
gsklee opened this issue Jun 24, 2013 · 7 comments

Comments

@gsklee
Copy link
Contributor

gsklee commented Jun 24, 2013

@matsko I guess support is already on the way?

Also - are we using some kind of CSS parser in ngAnimate's implementation? I thought it's like Angular will hook the CSS classes onto elements at proper timing etc., but partial support on available properties seem to be hinting otherwise.

@matsko
Copy link
Contributor

matsko commented Jun 24, 2013

It already supports AnimationIterationCount (https://github.com/angular/angular.js/blob/master/src/ng/animator.js#L363). And direction shouldn't affect the timing values in the animation so it should work as usual. Have you given it a try yet?

Regarding classes. Can you elaborate more on this? There are plans to change ngAnimate to use ngClass primarily with specific classes per animation event (that might actually stick around after the animation is complete). But this might not be what you're talking about.

@gsklee
Copy link
Contributor Author

gsklee commented Jun 25, 2013

I used the animation shorthand and it doesn't appear to be working:
http://plnkr.co/edit/QN0McbVD39E4527KaaAV

Regarding the second part I was just wondering how ngAnimate parses CSS rules =p
What do you mean about the ngClass planned change?

@matsko
Copy link
Contributor

matsko commented Jun 27, 2013

Ahh, infinite isn't supported no. NgAnimate just expands the window between DOM operations and there is always a finite amount of time in between. In other words, animations always end. If you really want to do something like this then just add a high number as the animation iteration count.

NgAnimate will soon be CSS-selector based and will work behind the scenes with class and ngClass. I'll explain more once I have the experimental stuff out of the way.

@matsko
Copy link
Contributor

matsko commented Jul 18, 2013

Hey @gsklee is this still an issue? Infinite will always turn into an iteration of 1 and animation direction is only handled by CSS and has nothing to do with $animator.

@gsklee
Copy link
Contributor Author

gsklee commented Jul 18, 2013

Hmm not sure, setting a high iteration count would work but sounds hackish. I presume that this issue would be solved when we move the implementation to be ngClass-based though.

@matsko
Copy link
Contributor

matsko commented Sep 5, 2013

Closing this for now since ngAnimate will be relying on the transitionend and animationend animation events so you can create infinite animation loops if you really want after this PR gets merged: #3882

@matsko matsko closed this as completed Sep 5, 2013
@gsklee
Copy link
Contributor Author

gsklee commented Sep 16, 2013

@matsko Cool ;)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants