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

Function executeAnimationFn

lib/test/angular/1.4.3/angular-animate.js:1666–1707  ·  view source on GitHub ↗
(fn, element, event, options, onDone)

Source from the content-addressed store, hash-verified

1664 };
1665
1666 function executeAnimationFn(fn, element, event, options, onDone) {
1667 var args;
1668 switch (event) {
1669 case 'animate':
1670 args = [element, options.from, options.to, onDone];
1671 break;
1672
1673 case 'setClass':
1674 args = [element, classesToAdd, classesToRemove, onDone];
1675 break;
1676
1677 case 'addClass':
1678 args = [element, classesToAdd, onDone];
1679 break;
1680
1681 case 'removeClass':
1682 args = [element, classesToRemove, onDone];
1683 break;
1684
1685 default:
1686 args = [element, onDone];
1687 break;
1688 }
1689
1690 args.push(options);
1691
1692 var value = fn.apply(fn, args);
1693 if (value) {
1694 if (isFunction(value.start)) {
1695 value = value.start();
1696 }
1697
1698 if (value instanceof $$AnimateRunner) {
1699 value.done(onDone);
1700 } else if (isFunction(value)) {
1701 // optional onEnd / onCancel callback
1702 return value;
1703 }
1704 }
1705
1706 return noop;
1707 }
1708
1709 function groupEventedAnimations(element, event, options, animations, fnName) {
1710 var operations = [];

Callers 1

groupEventedAnimationsFunction · 0.70

Calls 1

isFunctionFunction · 0.70

Tested by

no test coverage detected