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

Function $$AnimateAsyncRunFactoryProvider

test/angular/1.7/angular.js:6244–6273  ·  view source on GitHub ↗

@this

()

Source from the content-addressed store, hash-verified

6242}];
6243
6244var $$AnimateAsyncRunFactoryProvider = /** @this */ function() {
6245 this.$get = ['$$rAF', function($$rAF) {
6246 var waitQueue = [];
6247
6248 function waitForTick(fn) {
6249 waitQueue.push(fn);
6250 if (waitQueue.length > 1) return;
6251 $$rAF(function() {
6252 for (var i = 0; i < waitQueue.length; i++) {
6253 waitQueue[i]();
6254 }
6255 waitQueue = [];
6256 });
6257 }
6258
6259 return function() {
6260 var passed = false;
6261 waitForTick(function() {
6262 passed = true;
6263 });
6264 return function(callback) {
6265 if (passed) {
6266 callback();
6267 } else {
6268 waitForTick(callback);
6269 }
6270 };
6271 };
6272 }];
6273};
6274
6275var $$AnimateRunnerFactoryProvider = /** @this */ function() {
6276 this.$get = ['$q', '$sniffer', '$$animateAsyncRun', '$$isDocumentHidden', '$timeout',

Callers

nothing calls this directly

Calls 2

waitForTickFunction · 0.70
callbackFunction · 0.70

Tested by

no test coverage detected