MCPcopy Create free account
hub / github.com/angular-ui/ui-grid / close

Function close

lib/test/angular/1.4.3/angular-animate.js:1054–1090  ·  view source on GitHub ↗
(rejected)

Source from the content-addressed store, hash-verified

1052 }
1053
1054 function close(rejected) { // jshint ignore:line
1055 // if the promise has been called already then we shouldn't close
1056 // the animation again
1057 if (animationClosed || (animationCompleted && animationPaused)) return;
1058 animationClosed = true;
1059 animationPaused = false;
1060
1061 $$jqLite.removeClass(element, setupClasses);
1062 $$jqLite.removeClass(element, activeClasses);
1063
1064 blockKeyframeAnimations(node, false);
1065 blockTransitions(node, false);
1066
1067 forEach(temporaryStyles, function(entry) {
1068 // There is only one way to remove inline style properties entirely from elements.
1069 // By using `removeProperty` this works, but we need to convert camel-cased CSS
1070 // styles down to hyphenated values.
1071 node.style[entry[0]] = '';
1072 });
1073
1074 applyAnimationClasses(element, options);
1075 applyAnimationStyles(element, options);
1076
1077 // the reason why we have this option is to allow a synchronous closing callback
1078 // that is fired as SOON as the animation ends (when the CSS is removed) or if
1079 // the animation never takes off at all. A good example is a leave animation since
1080 // the element must be removed just after the animation is over or else the element
1081 // will appear on screen for one animation frame causing an overbearing flicker.
1082 if (options.onDone) {
1083 options.onDone();
1084 }
1085
1086 // if the preparation function fails then the promise is not setup
1087 if (runner) {
1088 runner.complete(!rejected);
1089 }
1090 }
1091
1092 function applyBlocking(duration) {
1093 if (flags.blockTransition) {

Callers 10

endFnFunction · 0.70
cancelFnFunction · 0.70
startFunction · 0.70
playPauseFunction · 0.70
triggerAnimationStartFunction · 0.70
onAnimationExpiredFunction · 0.70
onAnimationProgressFunction · 0.70
queueAnimationFunction · 0.70
angular-animate.jsFile · 0.70

Calls 5

blockKeyframeAnimationsFunction · 0.70
blockTransitionsFunction · 0.70
forEachFunction · 0.70
applyAnimationStylesFunction · 0.70
removeRunnerFunction · 0.70

Tested by

no test coverage detected