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

Function closeAnimation

test/angular/1.3/angular-animate.js:1467–1501  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1465 }
1466
1467 function closeAnimation() {
1468 if (!closeAnimation.hasBeenRun) {
1469 if (runner) { //the runner doesn't exist if it fails to instantiate
1470 runner.applyStyles();
1471 }
1472
1473 closeAnimation.hasBeenRun = true;
1474 if (options && options.tempClasses) {
1475 forEach(options.tempClasses, function(className) {
1476 $$jqLite.removeClass(element, className);
1477 });
1478 }
1479
1480 var data = element.data(NG_ANIMATE_STATE);
1481 if (data) {
1482
1483 /* only structural animations wait for reflow before removing an
1484 animation, but class-based animations don't. An example of this
1485 failing would be when a parent HTML tag has a ng-class attribute
1486 causing ALL directives below to skip animations during the digest */
1487 if (runner && runner.isClassBased) {
1488 cleanup(element, className);
1489 } else {
1490 $$asyncCallback(function() {
1491 var data = element.data(NG_ANIMATE_STATE) || {};
1492 if (localAnimationCount == data.index) {
1493 cleanup(element, className, animationEvent);
1494 }
1495 });
1496 element.data(NG_ANIMATE_STATE, data);
1497 }
1498 }
1499 fireDoneCallbackAsync();
1500 }
1501 }
1502 }
1503
1504 function cancelChildAnimations(element) {

Callers 1

performAnimationFunction · 0.70

Calls 3

forEachFunction · 0.70
cleanupFunction · 0.70
fireDoneCallbackAsyncFunction · 0.70

Tested by

no test coverage detected