aboutsummaryrefslogtreecommitdiffstats
path: root/src/ngAnimate/animate.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/ngAnimate/animate.js')
-rw-r--r--src/ngAnimate/animate.js18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/ngAnimate/animate.js b/src/ngAnimate/animate.js
index 16d0aa0d..08c088e9 100644
--- a/src/ngAnimate/animate.js
+++ b/src/ngAnimate/animate.js
@@ -288,6 +288,13 @@ angular.module('ngAnimate', ['ng'])
});
});
+ var classNameFilter = $animateProvider.classNameFilter();
+ var isAnimatableClassName = !classNameFilter
+ ? function() { return true; }
+ : function(className) {
+ return classNameFilter.test(className);
+ };
+
function lookup(name) {
if (name) {
var matches = [],
@@ -569,17 +576,20 @@ angular.module('ngAnimate', ['ng'])
and the onComplete callback will be fired once the animation is fully complete.
*/
function performAnimation(animationEvent, className, element, parentElement, afterElement, domOperation, doneCallback) {
- var node = extractElementNode(element);
+ var currentClassName, classes, node = extractElementNode(element);
+ if(node) {
+ currentClassName = node.className;
+ classes = currentClassName + ' ' + className;
+ }
+
//transcluded directives may sometimes fire an animation using only comment nodes
//best to catch this early on to prevent any animation operations from occurring
- if(!node) {
+ if(!node || !isAnimatableClassName(classes)) {
fireDOMOperation();
closeAnimation();
return;
}
- var currentClassName = node.className;
- var classes = currentClassName + ' ' + className;
var animationLookup = (' ' + classes).replace(/\s+/g,'.');
if (!parentElement) {
parentElement = afterElement ? afterElement.parent() : element.parent();