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

Function $$AnimateAsyncRunFactoryProvider

test/angular/1.5/angular.js:5733–5762  ·  view source on GitHub ↗

@this

()

Source from the content-addressed store, hash-verified

5731}];
5732
5733var $$AnimateAsyncRunFactoryProvider = /** @this */ function() {
5734 this.$get = ['$$rAF', function($$rAF) {
5735 var waitQueue = [];
5736
5737 function waitForTick(fn) {
5738 waitQueue.push(fn);
5739 if (waitQueue.length > 1) return;
5740 $$rAF(function() {
5741 for (var i = 0; i < waitQueue.length; i++) {
5742 waitQueue[i]();
5743 }
5744 waitQueue = [];
5745 });
5746 }
5747
5748 return function() {
5749 var passed = false;
5750 waitForTick(function() {
5751 passed = true;
5752 });
5753 return function(callback) {
5754 if (passed) {
5755 callback();
5756 } else {
5757 waitForTick(callback);
5758 }
5759 };
5760 };
5761 }];
5762};
5763
5764var $$AnimateRunnerFactoryProvider = /** @this */ function() {
5765 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