diff options
Diffstat (limited to 'src/ngAnimate')
| -rw-r--r-- | src/ngAnimate/animate.js | 12 | 
1 files changed, 6 insertions, 6 deletions
diff --git a/src/ngAnimate/animate.js b/src/ngAnimate/animate.js index b2b88d0a..6b72f4a8 100644 --- a/src/ngAnimate/animate.js +++ b/src/ngAnimate/animate.js @@ -588,6 +588,7 @@ angular.module('ngAnimate', ['ng'])            //if an animation is currently running on the element then lets take the steps            //to cancel that animation and fire any required callbacks            $timeout.cancel(ngAnimateState.flagTimer); +          cleanup(element);            cancelAnimations(ngAnimateState.animations);            (ngAnimateState.done || noop)();          } @@ -700,25 +701,24 @@ angular.module('ngAnimate', ['ng'])            return rootAnimateState.disabled || rootAnimateState.running;          } -        var validState;          do {            //the element did not reach the root element which means that it            //is not apart of the DOM. Therefore there is no reason to do            //any animations on it -          if(parent.length === 0) return true; +          if(parent.length === 0) break;            var isRoot = parent[0] == $rootElement[0];            var state = isRoot ? rootAnimateState : parent.data(NG_ANIMATE_STATE); -          if(state && (state.disabled != null || state.running != null)) { -            validState = state; -            break; +          var result = state && (!!state.disabled || !!state.running); +          if(isRoot || result) { +            return result;            }            if(isRoot) return true;          }          while(parent = parent.parent()); -        return validState ? (validState.disabled || validState.running) : true; +        return true;        }      }]);  | 
