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

Function closeAnimation

test/angular/1.2/angular-animate.js:1008–1031  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1006 }
1007
1008 function closeAnimation() {
1009 if(!closeAnimation.hasBeenRun) {
1010 closeAnimation.hasBeenRun = true;
1011 var data = element.data(NG_ANIMATE_STATE);
1012 if(data) {
1013 /* only structural animations wait for reflow before removing an
1014 animation, but class-based animations don't. An example of this
1015 failing would be when a parent HTML tag has a ng-class attribute
1016 causing ALL directives below to skip animations during the digest */
1017 if(runner && runner.isClassBased) {
1018 cleanup(element, className);
1019 } else {
1020 $$asyncCallback(function() {
1021 var data = element.data(NG_ANIMATE_STATE) || {};
1022 if(localAnimationCount == data.index) {
1023 cleanup(element, className, animationEvent);
1024 }
1025 });
1026 element.data(NG_ANIMATE_STATE, data);
1027 }
1028 }
1029 fireDoneCallbackAsync();
1030 }
1031 }
1032 }
1033
1034 function cancelChildAnimations(element) {

Callers 1

performAnimationFunction · 0.70

Calls 2

cleanupFunction · 0.70
fireDoneCallbackAsyncFunction · 0.70

Tested by

no test coverage detected