Skip to content
This repository was archived by the owner on Apr 17, 2025. It is now read-only.

Commit 4a4825f

Browse files
committed
v1.5.0-build.4273+sha.8b27c3f
1 parent 4c714d7 commit 4a4825f

32 files changed

+129
-103
lines changed

snapshot/angular-animate.js

Lines changed: 36 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* @license AngularJS v1.5.0-build.4272+sha.8366622
2+
* @license AngularJS v1.5.0-build.4273+sha.8b27c3f
33
* (c) 2010-2015 Google, Inc. http://angularjs.org
44
* License: MIT
55
*/
@@ -2027,6 +2027,24 @@ var $$AnimateQueueProvider = ['$animateProvider', function($animateProvider) {
20272027
var disabledElementsLookup = new $$HashMap();
20282028
var animationsEnabled = null;
20292029

2030+
function postDigestTaskFactory() {
2031+
var postDigestCalled = false;
2032+
return function(fn) {
2033+
// we only issue a call to postDigest before
2034+
// it has first passed. This prevents any callbacks
2035+
// from not firing once the animation has completed
2036+
// since it will be out of the digest cycle.
2037+
if (postDigestCalled) {
2038+
fn();
2039+
} else {
2040+
$rootScope.$$postDigest(function() {
2041+
postDigestCalled = true;
2042+
fn();
2043+
});
2044+
}
2045+
};
2046+
}
2047+
20302048
// Wait until all directive and route-related templates are downloaded and
20312049
// compiled. The $templateRequest.totalPendingRequests variable keeps track of
20322050
// all of the remote templates being currently downloaded. If there are no
@@ -2089,14 +2107,6 @@ var $$AnimateQueueProvider = ['$animateProvider', function($animateProvider) {
20892107
return matches;
20902108
}
20912109

2092-
function triggerCallback(event, element, phase, data) {
2093-
$$rAF(function() {
2094-
forEach(findCallbacks(element, event), function(callback) {
2095-
callback(element, phase, data);
2096-
});
2097-
});
2098-
}
2099-
21002110
return {
21012111
on: function(event, container, callback) {
21022112
var node = extractElementNode(container);
@@ -2191,6 +2201,9 @@ var $$AnimateQueueProvider = ['$animateProvider', function($animateProvider) {
21912201
// These methods will become available after the digest has passed
21922202
var runner = new $$AnimateRunner();
21932203

2204+
// this is used to trigger callbacks in postDigest mode
2205+
var runInNextPostDigestOrNow = postDigestTaskFactory();
2206+
21942207
if (isArray(options.addClass)) {
21952208
options.addClass = options.addClass.join(' ');
21962209
}
@@ -2411,7 +2424,20 @@ var $$AnimateQueueProvider = ['$animateProvider', function($animateProvider) {
24112424
return runner;
24122425

24132426
function notifyProgress(runner, event, phase, data) {
2414-
triggerCallback(event, element, phase, data);
2427+
runInNextPostDigestOrNow(function() {
2428+
var callbacks = findCallbacks(element, event);
2429+
if (callbacks.length) {
2430+
// do not optimize this call here to RAF because
2431+
// we don't know how heavy the callback code here will
2432+
// be and if this code is buffered then this can
2433+
// lead to a performance regression.
2434+
$$rAF(function() {
2435+
forEach(callbacks, function(callback) {
2436+
callback(element, phase, data);
2437+
});
2438+
});
2439+
}
2440+
});
24152441
runner.progress(event, phase, data);
24162442
}
24172443

snapshot/angular-animate.min.js

Lines changed: 47 additions & 47 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

snapshot/angular-animate.min.js.map

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

snapshot/angular-aria.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* @license AngularJS v1.5.0-build.4272+sha.8366622
2+
* @license AngularJS v1.5.0-build.4273+sha.8b27c3f
33
* (c) 2010-2015 Google, Inc. http://angularjs.org
44
* License: MIT
55
*/

snapshot/angular-aria.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

snapshot/angular-cookies.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* @license AngularJS v1.5.0-build.4272+sha.8366622
2+
* @license AngularJS v1.5.0-build.4273+sha.8b27c3f
33
* (c) 2010-2015 Google, Inc. http://angularjs.org
44
* License: MIT
55
*/

snapshot/angular-cookies.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

snapshot/angular-loader.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* @license AngularJS v1.5.0-build.4272+sha.8366622
2+
* @license AngularJS v1.5.0-build.4273+sha.8b27c3f
33
* (c) 2010-2015 Google, Inc. http://angularjs.org
44
* License: MIT
55
*/
@@ -59,7 +59,7 @@ function minErr(module, ErrorConstructor) {
5959
return match;
6060
});
6161

62-
message += '\nhttp://errors.angularjs.org/1.5.0-build.4272+sha.8366622/' +
62+
message += '\nhttp://errors.angularjs.org/1.5.0-build.4273+sha.8b27c3f/' +
6363
(module ? module + '/' : '') + code;
6464

6565
for (i = SKIP_INDEXES, paramPrefix = '?'; i < templateArgs.length; i++, paramPrefix = '&') {

snapshot/angular-loader.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)