MCPcopy
hub / github.com/angular-ui/ui-router / animate

Function animate

test/angular/1.2/angular-animate.js:1540–1569  ·  view source on GitHub ↗
(animationEvent, element, className, animationComplete)

Source from the content-addressed store, hash-verified

1538 }
1539
1540 function animate(animationEvent, element, className, animationComplete) {
1541 //If the animateSetup function doesn't bother returning a
1542 //cancellation function then it means that there is no animation
1543 //to perform at all
1544 var preReflowCancellation = animateBefore(animationEvent, element, className);
1545 if (!preReflowCancellation) {
1546 clearCacheAfterReflow();
1547 animationComplete();
1548 return;
1549 }
1550
1551 //There are two cancellation functions: one is before the first
1552 //reflow animation and the second is during the active state
1553 //animation. The first function will take care of removing the
1554 //data from the element which will not make the 2nd animation
1555 //happen in the first place
1556 var cancel = preReflowCancellation;
1557 afterReflow(element, function() {
1558 unblockTransitions(element, className);
1559 unblockKeyframeAnimations(element);
1560 //once the reflow is complete then we point cancel to
1561 //the new cancellation function which will remove all of the
1562 //animation properties from the active animation
1563 cancel = animateAfter(animationEvent, element, className, animationComplete);
1564 });
1565
1566 return function(cancelled) {
1567 (cancel || noop)(cancelled);
1568 };
1569 }
1570
1571 function animateClose(element, className) {
1572 element.removeClass(className);

Callers 1

angular-animate.jsFile · 0.70

Calls 6

unblockTransitionsFunction · 0.85
animateBeforeFunction · 0.70
clearCacheAfterReflowFunction · 0.70
afterReflowFunction · 0.70
animateAfterFunction · 0.70

Tested by

no test coverage detected