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

Function packageAnimations

lib/test/angular/1.4.3/angular-animate.js:1750–1789  ·  view source on GitHub ↗
(element, event, options, animations, fnName)

Source from the content-addressed store, hash-verified

1748 }
1749
1750 function packageAnimations(element, event, options, animations, fnName) {
1751 var operations = groupEventedAnimations(element, event, options, animations, fnName);
1752 if (operations.length === 0) {
1753 var a,b;
1754 if (fnName === 'beforeSetClass') {
1755 a = groupEventedAnimations(element, 'removeClass', options, animations, 'beforeRemoveClass');
1756 b = groupEventedAnimations(element, 'addClass', options, animations, 'beforeAddClass');
1757 } else if (fnName === 'setClass') {
1758 a = groupEventedAnimations(element, 'removeClass', options, animations, 'removeClass');
1759 b = groupEventedAnimations(element, 'addClass', options, animations, 'addClass');
1760 }
1761
1762 if (a) {
1763 operations = operations.concat(a);
1764 }
1765 if (b) {
1766 operations = operations.concat(b);
1767 }
1768 }
1769
1770 if (operations.length === 0) return;
1771
1772 // TODO(matsko): add documentation
1773 return function startAnimation(callback) {
1774 var runners = [];
1775 if (operations.length) {
1776 forEach(operations, function(animateFn) {
1777 runners.push(animateFn());
1778 });
1779 }
1780
1781 runners.length ? $$AnimateRunner.all(runners, callback) : callback();
1782
1783 return function endFn(reject) {
1784 forEach(runners, function(runner) {
1785 reject ? runner.cancel() : runner.end();
1786 });
1787 };
1788 };
1789 }
1790 };
1791
1792 function lookupAnimations(classes) {

Callers 1

angular-animate.jsFile · 0.70

Calls 3

groupEventedAnimationsFunction · 0.70
forEachFunction · 0.70
callbackFunction · 0.70

Tested by

no test coverage detected