-
Notifications
You must be signed in to change notification settings - Fork 27.4k
fix(ngAnimate): properly cancel-out previously running class-based animations #13814
Conversation
Unfortunately, I'm not seeing that the issue is fixed: http://plnkr.co/edit/HIaO54UfXl9z674KSzZV?p=preview Steps to repdroduce - just being verbose, to make sure we see the same thing.
What should we see? What do we see? The whole thing doesn't happen when you switch the link slowly. |
…imations Prior to this fix the addition and removal of a CSS class via ngAnimate would cause flicker effects because $animate was unable to keep track of the CSS classes once they were applied to the element. This fix ensures that ngAnimate always keeps a reference to the classes in the currently running animation so that cancelling works accordingly. Closes angular#10156 Closes angular#13814
f7181cc
to
9a2fbdc
Compare
@Narretz try this demo: http://plnkr.co/edit/GwDlruHuZs4ZKFP7kqC9?p=preview. I think your animate.js might have not been the right build. |
@matsko Oh, do I look stupid now! I've only built the unminified version, but tested it with the minified, which was older of course. Let's just pretend this didn't happen, okay? 😉 |
@Narretz I won't tell anyone :P |
Great! Will it get into 1.3? |
We don't backport to 1.3 anymore. And I think the bug was introduced in 1.4
|
@vitaly-t Okay, I see it has been reported first for 1.3, but we don't support 1.3 - only for major breaking stuff. |
…imations Prior to this fix the addition and removal of a CSS class via ngAnimate would cause flicker effects because $animate was unable to keep track of the CSS classes once they were applied to the element. This fix ensures that ngAnimate always keeps a reference to the classes in the currently running animation so that cancelling works accordingly. Closes angular#10156 Closes angular#13814
@@ -374,7 +379,7 @@ var $$AnimateQueueProvider = ['$animateProvider', function($animateProvider) { | |||
close(); | |||
return runner; | |||
} else { | |||
mergeAnimationOptions(element, existingAnimation.options, options); | |||
mergeAnimationDetails(element, existingAnimation.options, options); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How come we don't need to pass the animation object, but the options (considering all other invocation changed) ?
Prior to this fix the addition and removal of a CSS class via
ngAnimate would cause flicker effects because $animate was unable
to keep track of the CSS classes once they were applied to the
element. This fix ensures that ngAnimate always keeps a reference
to the classes in the currently running animation so that cancelling
works accordingly.
Closes #10156
Closes #13814
Please merge for 1.4 and 1.5.