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

Function executeAnimationFn

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

Source from the content-addressed store, hash-verified

1942 };
1943
1944 function executeAnimationFn(fn, element, event, options, onDone) {
1945 var args;
1946 switch (event) {
1947 case 'animate':
1948 args = [element, options.from, options.to, onDone];
1949 break;
1950
1951 case 'setClass':
1952 args = [element, classesToAdd, classesToRemove, onDone];
1953 break;
1954
1955 case 'addClass':
1956 args = [element, classesToAdd, onDone];
1957 break;
1958
1959 case 'removeClass':
1960 args = [element, classesToRemove, onDone];
1961 break;
1962
1963 default:
1964 args = [element, onDone];
1965 break;
1966 }
1967
1968 args.push(options);
1969
1970 var value = fn.apply(fn, args);
1971 if (value) {
1972 if (isFunction(value.start)) {
1973 value = value.start();
1974 }
1975
1976 if (value instanceof $$AnimateRunner) {
1977 value.done(onDone);
1978 } else if (isFunction(value)) {
1979 // optional onEnd / onCancel callback
1980 return value;
1981 }
1982 }
1983
1984 return noop;
1985 }
1986
1987 function groupEventedAnimations(element, event, options, animations, fnName) {
1988 var operations = [];

Callers 1

groupEventedAnimationsFunction · 0.70

Calls 1

isFunctionFunction · 0.70

Tested by

no test coverage detected