Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 21ca2ee

Browse files
committed
refactor(ngAnimate): simplify markElementAnimationState() and remove redundant calls
1 parent 9f55361 commit 21ca2ee

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/ngAnimate/animateQueue.js

+3-4
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,7 @@ var $$AnimateQueueProvider = ['$animateProvider', /** @this */ function($animate
482482
var counter = (existingAnimation.counter || 0) + 1;
483483
newAnimation.counter = counter;
484484

485-
markElementAnimationState(element, PRE_DIGEST_STATE, newAnimation);
485+
markElementAnimationState(node, PRE_DIGEST_STATE, newAnimation);
486486

487487
$rootScope.$$postDigest(function() {
488488
var animationDetails = activeAnimationsLookup.get(node);
@@ -535,7 +535,7 @@ var $$AnimateQueueProvider = ['$animateProvider', /** @this */ function($animate
535535
? 'setClass'
536536
: animationDetails.event;
537537

538-
markElementAnimationState(element, RUNNING_STATE);
538+
markElementAnimationState(node, RUNNING_STATE);
539539
var realRunner = $$animation(element, event, animationDetails.options);
540540

541541
// this will update the runner's flow-control events based on
@@ -700,11 +700,10 @@ var $$AnimateQueueProvider = ['$animateProvider', /** @this */ function($animate
700700
return allowAnimation && rootNodeDetected && bodyNodeDetected;
701701
}
702702

703-
function markElementAnimationState(element, state, details) {
703+
function markElementAnimationState(node, state, details) {
704704
details = details || {};
705705
details.state = state;
706706

707-
var node = getDomNode(element);
708707
node.setAttribute(NG_ANIMATE_ATTR_NAME, state);
709708

710709
var oldValue = activeAnimationsLookup.get(node);

0 commit comments

Comments
 (0)