aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ngAnimate/animate.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/ngAnimate/animate.js b/src/ngAnimate/animate.js
index 5f8dc673..64ed3029 100644
--- a/src/ngAnimate/animate.js
+++ b/src/ngAnimate/animate.js
@@ -610,9 +610,14 @@ angular.module('ngAnimate', ['ng'])
}
var animations = [];
+
//only add animations if the currently running animation is not structural
//or if there is no animation running at all
- if(!ngAnimateState.running || !(isClassBased && ngAnimateState.structural)) {
+ var allowAnimations = isClassBased ?
+ !ngAnimateState.disabled && (!ngAnimateState.running || !ngAnimateState.structural) :
+ true;
+
+ if(allowAnimations) {
forEach(matches, function(animation) {
//add the animation to the queue to if it is allowed to be cancelled
if(!animation.allowCancel || animation.allowCancel(element, animationEvent, className)) {