MCPcopy
hub / github.com/angular-ui/ui-router / $$AnimateAsyncRunFactoryProvider

Function $$AnimateAsyncRunFactoryProvider

test/angular/1.4/angular.js:5461–5486  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

5459}];
5460
5461var $$AnimateAsyncRunFactoryProvider = function() {
5462 this.$get = ['$$rAF', function($$rAF) {
5463 var waitQueue = [];
5464
5465 function waitForTick(fn) {
5466 waitQueue.push(fn);
5467 if (waitQueue.length > 1) return;
5468 $$rAF(function() {
5469 for (var i = 0; i < waitQueue.length; i++) {
5470 waitQueue[i]();
5471 }
5472 waitQueue = [];
5473 });
5474 }
5475
5476 return function() {
5477 var passed = false;
5478 waitForTick(function() {
5479 passed = true;
5480 });
5481 return function(callback) {
5482 passed ? callback() : waitForTick(callback);
5483 };
5484 };
5485 }];
5486};
5487
5488var $$AnimateRunnerFactoryProvider = function() {
5489 this.$get = ['$q', '$sniffer', '$$animateAsyncRun', '$document', '$timeout',

Callers

nothing calls this directly

Calls 2

waitForTickFunction · 0.70
callbackFunction · 0.70

Tested by

no test coverage detected