cwadrupldijjit / ng2-parallax

A parallax plugin/directive for Angular 2. Learn more at:
http://cwadrupldijjit.com/ng2-parallax
MIT License
29 stars 18 forks source link

Does this directive use the new ng2 animate? #3

Open matthewharwood opened 8 years ago

matthewharwood commented 8 years ago

Are you running your own custom request animation frame or is it running through the baked in ng animate? #

cwadrupldijjit commented 8 years ago

Sorry for the long wait for an answer--I thought that I had already answered this.

It actually doesn't need to request an animation frame, or even use ngAnimate. It uses scroll events to detect changes, and depending on your configuration, it just updates the .style object on that element to make it work. It works smoothly and cleanly, and as such I don't see the need for either of those.

I'd suggest looking at the code. Do you think it can be done more cleanly?

MurhafSousli commented 8 years ago

Ng animate doesnt support dynamic values yet so it can't be done, even when it happens it works the same way

cwadrupldijjit commented 5 years ago

Out of curiosity, does ngAnimate now support dynamic values? What would be the advantage of using ngAnimate over CSS transitions or the like?

This may also need to be continued on the new repo here. I'll try to migrate the issue over soon: cwdj-parallax