MCPcopy
hub / github.com/angular-ui/ui-router / cancelChildAnimations

Function cancelChildAnimations

test/angular/1.2/angular-animate.js:1034–1050  ·  view source on GitHub ↗
(element)

Source from the content-addressed store, hash-verified

1032 }
1033
1034 function cancelChildAnimations(element) {
1035 var node = extractElementNode(element);
1036 if (node) {
1037 var nodes = angular.isFunction(node.getElementsByClassName) ?
1038 node.getElementsByClassName(NG_ANIMATE_CLASS_NAME) :
1039 node.querySelectorAll('.' + NG_ANIMATE_CLASS_NAME);
1040 forEach(nodes, function(element) {
1041 element = angular.element(element);
1042 var data = element.data(NG_ANIMATE_STATE);
1043 if(data && data.active) {
1044 forEach(data.active, function(runner) {
1045 runner.cancel();
1046 });
1047 }
1048 });
1049 }
1050 }
1051
1052 function cleanup(element, className) {
1053 if(isMatchingElement(element, $rootElement)) {

Callers 1

angular-animate.jsFile · 0.70

Calls 2

extractElementNodeFunction · 0.70
forEachFunction · 0.70

Tested by

no test coverage detected