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

Function executeAnimationFn

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

Source from the content-addressed store, hash-verified

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

Callers 1

groupEventedAnimationsFunction · 0.70

Calls 1

isFunctionFunction · 0.70

Tested by

no test coverage detected