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

Function cancelChildAnimations

test/angular/1.3/angular-animate.js:1504–1520  ·  view source on GitHub ↗
(element)

Source from the content-addressed store, hash-verified

1502 }
1503
1504 function cancelChildAnimations(element) {
1505 var node = extractElementNode(element);
1506 if (node) {
1507 var nodes = angular.isFunction(node.getElementsByClassName) ?
1508 node.getElementsByClassName(NG_ANIMATE_CLASS_NAME) :
1509 node.querySelectorAll('.' + NG_ANIMATE_CLASS_NAME);
1510 forEach(nodes, function(element) {
1511 element = angular.element(element);
1512 var data = element.data(NG_ANIMATE_STATE);
1513 if (data && data.active) {
1514 forEach(data.active, function(runner) {
1515 runner.cancel();
1516 });
1517 }
1518 });
1519 }
1520 }
1521
1522 function cleanup(element, className) {
1523 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