MCPcopy Index your code
hub / github.com/angular-ui/ui-router / animate

Function animate

test/angular/1.3/angular-animate.js:2009–2036  ·  view source on GitHub ↗
(animationEvent, element, className, animationComplete, options)

Source from the content-addressed store, hash-verified

2007 }
2008
2009 function animate(animationEvent, element, className, animationComplete, options) {
2010 //If the animateSetup function doesn't bother returning a
2011 //cancellation function then it means that there is no animation
2012 //to perform at all
2013 var preReflowCancellation = animateBefore(animationEvent, element, className, options.from);
2014 if (!preReflowCancellation) {
2015 clearCacheAfterReflow();
2016 animationComplete();
2017 return;
2018 }
2019
2020 //There are two cancellation functions: one is before the first
2021 //reflow animation and the second is during the active state
2022 //animation. The first function will take care of removing the
2023 //data from the element which will not make the 2nd animation
2024 //happen in the first place
2025 var cancel = preReflowCancellation;
2026 afterReflow(element, function() {
2027 //once the reflow is complete then we point cancel to
2028 //the new cancellation function which will remove all of the
2029 //animation properties from the active animation
2030 cancel = animateAfter(animationEvent, element, className, animationComplete, options.to);
2031 });
2032
2033 return function(cancelled) {
2034 (cancel || noop)(cancelled);
2035 };
2036 }
2037
2038 function animateClose(element, className) {
2039 $$jqLite.removeClass(element, className);

Callers 1

angular-animate.jsFile · 0.70

Calls 4

animateBeforeFunction · 0.70
clearCacheAfterReflowFunction · 0.70
afterReflowFunction · 0.70
animateAfterFunction · 0.70

Tested by

no test coverage detected