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

Function $$AnimateAsyncRunFactoryProvider

lib/test/angular/1.6.7/angular.js:6111–6140  ·  view source on GitHub ↗

@this

()

Source from the content-addressed store, hash-verified

6109}];
6110
6111var $$AnimateAsyncRunFactoryProvider = /** @this */ function() {
6112 this.$get = ['$$rAF', function($$rAF) {
6113 var waitQueue = [];
6114
6115 function waitForTick(fn) {
6116 waitQueue.push(fn);
6117 if (waitQueue.length > 1) return;
6118 $$rAF(function() {
6119 for (var i = 0; i < waitQueue.length; i++) {
6120 waitQueue[i]();
6121 }
6122 waitQueue = [];
6123 });
6124 }
6125
6126 return function() {
6127 var passed = false;
6128 waitForTick(function() {
6129 passed = true;
6130 });
6131 return function(callback) {
6132 if (passed) {
6133 callback();
6134 } else {
6135 waitForTick(callback);
6136 }
6137 };
6138 };
6139 }];
6140};
6141
6142var $$AnimateRunnerFactoryProvider = /** @this */ function() {
6143 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