From 7c605ddf1c57c9f162827713ca5b0fbb12de5fa5 Mon Sep 17 00:00:00 2001 From: Matias Niemelä Date: Thu, 22 Aug 2013 09:30:11 -0400 Subject: fix($animate): skip ngAnimate animations if the provided element already has transitions/durations attached to it Closes #3587 --- src/ng/directive/ngClass.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/ng') diff --git a/src/ng/directive/ngClass.js b/src/ng/directive/ngClass.js index db6e7ac8..9edb0a3e 100644 --- a/src/ng/directive/ngClass.js +++ b/src/ng/directive/ngClass.js @@ -151,7 +151,7 @@ function classDirective(name, selector) { ## Animations - Example that demostrates how addition and removal of classes can be animated. + The example below demonstrates how to perform animations using ngClass. @@ -196,6 +196,14 @@ function classDirective(name, selector) { }); + + + ## ngClass and pre-existing CSS3 Transitions/Animations + The ngClass directive still supports CSS3 Transitions/Animations even if they do not follow the ngAnimate CSS naming structure. + Therefore, if any CSS3 Transition/Animation styles (outside of ngAnimate) are set on the element, then, if a ngClass animation + is triggered, the ngClass animation will be skipped so that ngAnimate can allow for the pre-existing transition or animation to + take over. This restriction allows for ngClass to still work with standard CSS3 Transitions/Animations that are defined + outside of ngAnimate. */ var ngClassDirective = classDirective('', true); -- cgit v1.2.3