-
Notifications
You must be signed in to change notification settings - Fork 6.7k
ui bootstrap carousel animation angular 1.2.* issues #1273
Comments
Until the directive is upgraded to use angular's ng-animation the directive should run
to disable angular from allying it's own animation classes. Here is an implementation that should work, but requires the ngAnimate module. Currently angular 1.2.1 is failing to honor this request. So that may be the cause of this issue in the first place. |
I've just tested with AngularJS 1.2.2 and things seem to be in order. Feel free to re-open the issue if needed (but please provide a reproduce scenario in plunker, jsFiddle is a pain to work with...). |
+1 - I'm seeing exactly the same issue, using the same versions of angular, angular-bootstrap and bootstrap css. |
+1 same issue angular 1.2.2 |
+1 for me as well. |
Updated to 1.2.3 I have been talking with @matsko about it. He has said the $animate.enabled(false, directiveElement); need to be on the parent of the animation.
|
This is in progress to be fixed by angular 1.2.4 but will still require the directive to include the ngAnimate module and disable or for an external directive like the one in my example to be use to disable it until the code is re factored to use ngAnimate. At this time i an unable to help with this effort. Maybe soon i can lean a hand. |
Can you guys provide an extra plunkr or two which is different from the one mentioned by @autumn01? |
@autumn01's code had a tiny snag that was causing the animation flag not to be set (or removed) on bootstrap. So based on his example it isn't really as issue. But it also looks like others in this commit still have an issue with this. If so please provide an extra plunkr example or open an issue in the AngularJS core. Thanks everyone. |
The sang (oops) is now resolved in my example: http://plnkr.co/edit/UWDcnJ2PGZd474D5SuoS?p=preview So the issue here is no longer related to angular js but to the implementation of the current carousel directive. In my example if you remove the set-ng-animate="$parent.animate" attribute on line 47. You will see how the angular animation are interfering with UI bootstrap carousel transitions. |
@matsko - this was my plunkr : http://plnkr.co/edit/Nqromw15crxowNqGlYBI It's a lot simpler than @autumn01's example and still exhibits strange behavior that I did not see with 1.2.0-rc.3 ... I'm quite prepared to be told I"m doing something stupid though. |
@iandotkelly thank you for sending the link. However, I am posting in this thread form angular.js. I'm actually not familiar with ui-bootstrap, I just wanted to know if $animate was causing any issues. Looks like $animate is still a work in progress with ui-bootstrap. |
@matsko - thanks |
@iandotkelly @pkozlowski-opensource |
Thanks @autumn01 |
Thanks alot @autumn01 ! |
+1, came here with this: http://plnkr.co/edit/OWOqmVJnf4MyjA601zWC?p=info |
@intellix doesn't look like it's working. |
+1 seeing this issue with angular-ui bootstrap 0.9.0 and angular-animate 1.2.8 |
@intellix I noticed that when you use that kind of scope variable, an object in your case, and you pass it on in the |
@Gamemaniak the version I posted illustrates an issue between changing the scope with something like $timeout and that having animate breaks it. Yours is just an initial carousel that works on mine as well :D |
Try out 1.2.9 later today since there are a few class-based animation fixes in there. |
1.2.9 completely killed UI Bootstrap animations for me. 1.2.10 didn't fix anything either :D I guess right now it's best to disable ngAnimate |
I lost the whole morning on this. |
Sorry for the troubles with ngAnimate and ui-bootstrap. Before $animate is more merged into ui-bootstrap, the internal class-based animation code will be refactored to group animations together instead of cancelling followup animations when a CSS class is added. This is a bit complex to fix, but it should make it into the next release. Then you can use $animate with ui-bootstrap without any side-effects. |
@matsko no worries - better to take time and do things right! Looking forward on talking / working with you on doing the $animate thing right in this project! |
Modal show/hide is broken with ngAnimate as well -- the 'in' class never gets added/removed. |
@fogAndWhisky I haven't tested with the latest, have you tried? If it is not intergrated yet, the simple workaround I provided should still do the job. |
@iamlothian I apologize...I'm not seeing your workaround. Did you post under a different username? |
Oops mobile posted to early, will clean that up later. Yep sorry @autumn01 posted it. |
Ah, ok. Thanks. :) I will test the @autumn01 workaround with latest build and report back. (Apologies to any watchers for spam posts). |
This will be fixed soon through #1878 . |
@chrisirhc Thanks. That's good to hear. @iamlothian Yes, the @autumn01 fix works just fine for now. Thanks very much. For anyone else trying to shortcut this thread and just find the (current) answer: this directive enables/disables ngAnimate for an individual component:
Used like this:
|
Would someone mind testing this out using the snapshot build of AngularJS? There was a change in the class-based animations that removed the blocking feature. This may just fix the problem. |
@matsko , looks like you've solved it. Previously, the add animations were blocking each other. Now they're getting applied correctly as the transition only exists when both classes are active (I think). EDIT: On reading your change further (angular/angular.js@1bebe36), I think it's because it's no longer blocking and waiting for the -add and -remove classes to finish "animating" before addition/removal. Looks good. 👍 Here are Plunkers with different builds. Snapshot: http://plnkr.co/edit/cct3xQz0BhqBgirFIs4k?p=preview |
updated my plunk above |
I've been holding back my angular-animate to 1.2.8 and this seemed to let ui bootstrap carousel work for a while. (In Firefox, its broken on Chrome though.) I noticed though, even while holding that back to 1.2.8, upgrading the core angular library from 1.2.12 to 1.2.13 breaks the carousel. (I even tried just using angular core 1.2.15 and angular-animate 1.2.15, also broken.) Been looking at the changes from 1.2.12 to 1.2.13: |
@linagee more than likely anything < 1.3-beta.4 won't fix the issue since the class-based animation fix was a breaking change. Have a go with the latest 1.3 snapshot. |
matsko: I can verify that 1.3.0-beta-4 looks a lot more better than 1.2.15! Thanks. |
To remove |
@leniel that issues is a duplication of this thread, and that solution was first proposed here 6 months ago. |
@iamlothian Oh yes... TLDR; 😄 So that should be marked as duplicate, shouldn't it? |
Hey guys. Is there anything else here that needs fixing in regards to ngAnimate? |
@matsko thnx for keeping an eye on this one, much appreciated! For the moment I'm not sure what the problem is, I really haven't had too much time to spend on the carousel thing lately... But seems like recurring problem so let me have a closer look over the weekend. |
@matsko @pkozlowski-opensource http://plnkr.co/edit/bY9nZIqvIkL4XybMe354?p=preview It looks like the directive still fails to function normally without disabling angular animation an the element. I had to do this manually though as enabling it agin after the initial load using Any ideas. EDIT Via @leniel: updated bootstrap ui version to 0.11.0 |
@iamlothian isn't the latest version 0.11.0? http://angular-ui.github.io/bootstrap/ |
I just ran into this, too. #1350 (comment) provided a satisfactory workaround. |
not sure if this is still live or not but the problem still exists with 1.3.0-beta.17 : http://plnkr.co/edit/DCzZ07jQxNO4GfqTf3aO?p=preview Thanks... |
Problem still exists. |
problem still exists with all latests |
Still have this problem in "angular": "1.3.2" and "bootstrap-sass-official": "~3.1.1" |
the new implementation of ng-animate seems to be interfering with the animation for the carousel slider directive.
note the extra classes. On my end this is causing flickering and
here is a coded example to explain the result http://jsfiddle.net/XxPzW/
I am trying to look into weather there is a way to disable ng-animate for a singe directive, I haven't found anything yet.
EDIT: This account is no longer used i now go by @iamlothian.
EDIT: http://plnkr.co/edit/UWDcnJ2PGZd474D5SuoS?p=preview (work around)
Used like this:
The text was updated successfully, but these errors were encountered: