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

Function $$AnimateAsyncRunFactoryProvider

lib/test/angular/1.8.0/angular.js:6309–6338  ·  view source on GitHub ↗

@this

()

Source from the content-addressed store, hash-verified

6307}];
6308
6309var $$AnimateAsyncRunFactoryProvider = /** @this */ function() {
6310 this.$get = ['$$rAF', function($$rAF) {
6311 var waitQueue = [];
6312
6313 function waitForTick(fn) {
6314 waitQueue.push(fn);
6315 if (waitQueue.length > 1) return;
6316 $$rAF(function() {
6317 for (var i = 0; i < waitQueue.length; i++) {
6318 waitQueue[i]();
6319 }
6320 waitQueue = [];
6321 });
6322 }
6323
6324 return function() {
6325 var passed = false;
6326 waitForTick(function() {
6327 passed = true;
6328 });
6329 return function(callback) {
6330 if (passed) {
6331 callback();
6332 } else {
6333 waitForTick(callback);
6334 }
6335 };
6336 };
6337 }];
6338};
6339
6340var $$AnimateRunnerFactoryProvider = /** @this */ function() {
6341 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