MCPcopy Create free account
hub / github.com/angular-ui/ui-router / prepareRegularAnimation

Function prepareRegularAnimation

test/angular/1.5/angular-animate.js:1751–1782  ·  view source on GitHub ↗
(animationDetails)

Source from the content-addressed store, hash-verified

1749 }
1750
1751 function prepareRegularAnimation(animationDetails) {
1752 var element = animationDetails.element;
1753 var options = animationDetails.options || {};
1754
1755 if (animationDetails.structural) {
1756 options.event = animationDetails.event;
1757 options.structural = true;
1758 options.applyClassesEarly = true;
1759
1760 // we special case the leave animation since we want to ensure that
1761 // the element is removed as soon as the animation is over. Otherwise
1762 // a flicker might appear or the element may not be removed at all
1763 if (animationDetails.event === 'leave') {
1764 options.onDone = options.domOperation;
1765 }
1766 }
1767
1768 // We assign the preparationClasses as the actual animation event since
1769 // the internals of $animateCss will just suffix the event token values
1770 // with `-active` to trigger the animation.
1771 if (options.preparationClasses) {
1772 options.event = concatWithSpace(options.event, options.preparationClasses);
1773 }
1774
1775 var animator = $animateCss(element, options);
1776
1777 // the driver lookup code inside of $$animation attempts to spawn a
1778 // driver one by one until a driver returns a.$$willAnimate animator object.
1779 // $animateCss will always return an object, however, it will pass in
1780 // a flag as a hint as to whether an animation was detected or not
1781 return animator.$$willAnimate ? animator : null;
1782 }
1783 }];
1784}];
1785

Callers 2

angular-animate.jsFile · 0.70

Calls 1

concatWithSpaceFunction · 0.70

Tested by

no test coverage detected