-
-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
show and animation #54
Comments
Btw, no problem with |
#47 fixes animation when using |
@zewa666 Can you look into this? |
We also discovered something like this with a show.bind when the animation ends aurelia-hide comes back. As stated above if.bind works just fine, but we cant use if.bind in this particular situation. Without the animation it works fine. |
+1 |
I had the same problem but only with Firefox. CSS: .aurelia-hide-remove { .au-animate { @-webkit-keyframes fadeIn { @-webkit-keyframes fadeOut { @-moz-keyframes fadeIn { @-moz-keyframes fadeOut { @Keyframes fadeIn { @Keyframes fadeOut { |
I'm still experiencing au-animate not working correctly on show.bind, did this issue just get dropped? |
Yeah, I don't see au-animate working on show.bind either - in aurelia-animator-css OR aurelia-animator-velocity. |
I just had a look at the source code: Aurelia searches for the first element in a view having an This means that when using The Aurelia documentation is a bit lacking in this area. |
I looked a bit more, and in fact the animator is used by the |
Ok, so So in your css you just have to add animations for those classes, e.g.:
and make sure your element with the binding has au-animate, e.g.: Tested and it works - hope this helps other people who stumble on this. |
@jordan-ware Thanks for being willing to dig into the code and share your findings with the community here. I apologize that this isn't well-documented. I'd love to see if we can improve this. Would anyone on this thread be interested in putting together a markdown file that explains how to use the CSS animation system? We could add that to our official documentation and give the author full credit of course :) |
Seems I was off the mark with this issue - the problem is that classes are getting overlayed when show.bind changes during an animation. I'll have a look - show.bind may just need to manage this concurrent behavior and queue transitions a little better or there may be some change to the animator. Will report back though I probably won't get time until the weekend. |
Sorry for the delay, my schedules only really just lightened up. I've submitted a PR containing the fix. It appears there was a unit test for this, but it wasn't configured properly and was reporting a false positive. The addClass/removeClass will now cancel the previous animation and pretty much start from the beginning of the latest animation triggered. I chose this over chaining the animations based on a comment I saw in the aurelia-templating repository about wanting to go in this direction. Developers calling the addClass/removeClass methods can chain the promises naturally if they want to. I'm interested in doing the documentation, I'll see what I can come up with. I'm not sure if I can be too timely with it so if anyone else is interested they may take the point. 😄 |
I see the release containing this fix is now available on NPM. I've upgraded my project and it has fixed the issue I was experiencing using Should be safe to close this now I think. |
Thanks! |
This still does not work on Mac, the '-add' and '-remove' are not being added to the 'aurelia-hide' class. On Windows, it does work |
When you say Mac do you mean Safari @davidGrocerKey ? |
No, even on Chrome on Mac |
Hmm that sounds weird. Perhaps you can share a minimal repro, I need to figure out meanwhile where to get a Mac |
I'm submitting a bug report
1.0.0
OSX 10.x
6.2.0
3.8.9
CLI 1.0.0
Chrome 52
ESNext
Current behavior:
I have an element with
show.bind
andau-animate
class. When I toggle element, it doesn't animate correctly.Here is my template:
I have first tried with a transition:
It didn't works. I can see the
aurelia-hide-remove
apparition when breaking on attribute changes, but it's removed immediately and there is no transition.Then, I tried with keyframes:
It doesn't really worked. The
aurelia-hide
class come back at the end of the animation and then,aurelia-hide-add
stays forever like you can see on the following screencast: https://www.dropbox.com/s/w4rwkgyabbcdb6r/aurelia-animation-bug.mov?dl=0And a demo from a virgin project created with au-cli and latest aurelia-animator-css : https://gist.run/?id=5e8f73adb49480852b8100511429b41f
The text was updated successfully, but these errors were encountered: