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

Function prepareRegularAnimation

test/angular/1.6/angular-animate.js:1757–1788  ·  view source on GitHub ↗
(animationDetails)

Source from the content-addressed store, hash-verified

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

Callers 2

angular-animate.jsFile · 0.70

Calls 1

concatWithSpaceFunction · 0.70

Tested by

no test coverage detected