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