aboutsummaryrefslogtreecommitdiffstats
path: root/src/ng/animator.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/ng/animator.js')
-rw-r--r--src/ng/animator.js15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/ng/animator.js b/src/ng/animator.js
index 536c93c1..d79822f7 100644
--- a/src/ng/animator.js
+++ b/src/ng/animator.js
@@ -272,14 +272,17 @@ var $AnimatorProvider = function() {
var durationKey = 'Duration';
var duration = 0;
+
//we want all the styles defined before and after
forEach(element, function(element) {
- var globalStyles = $window.getComputedStyle(element) || {};
- duration = Math.max(
- parseFloat(globalStyles[w3cTransitionProp + durationKey]) ||
- parseFloat(globalStyles[vendorTransitionProp + durationKey]) ||
- 0,
- duration);
+ if (element.nodeType == 1) {
+ var globalStyles = $window.getComputedStyle(element) || {};
+ duration = Math.max(
+ parseFloat(globalStyles[w3cTransitionProp + durationKey]) ||
+ parseFloat(globalStyles[vendorTransitionProp + durationKey]) ||
+ 0,
+ duration);
+ }
});
$window.setTimeout(done, duration * 1000);
} else {