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

Commit b89622b

Browse files
committed
v1.5.0-build.4279+sha.9f67da6
1 parent 7e7165b commit b89622b

35 files changed

+194
-137
lines changed

snapshot/angular-animate.js

Lines changed: 42 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* @license AngularJS v1.5.0-build.4278+sha.b3a3c6a
2+
* @license AngularJS v1.5.0-build.4279+sha.9f67da6
33
* (c) 2010-2015 Google, Inc. http://angularjs.org
44
* License: MIT
55
*/
@@ -640,6 +640,10 @@ var ANIMATE_TIMER_KEY = '$$animateCss';
640640
* * `staggerIndex` - The numeric index representing the stagger item (e.g. a value of 5 is equal to the sixth item in the stagger; therefore when a
641641
* * `stagger` option value of `0.1` is used then there will be a stagger delay of `600ms`)
642642
* * `applyClassesEarly` - Whether or not the classes being added or removed will be used when detecting the animation. This is set by `$animate` when enter/leave/move animations are fired to ensure that the CSS classes are resolved in time. (Note that this will prevent any transitions from occuring on the classes being added and removed.)
643+
* * `cleanupStyles` - Whether or not the provided `from` and `to` styles will be removed once
644+
* the animation is closed. This is useful for when the styles are used purely for the sake of
645+
* the animation and do not have a lasting visual effect on the element (e.g. a colapse and open animation).
646+
* By default this value is set to `false`.
643647
*
644648
* @return {object} an object with start and end methods and details about the animation.
645649
*
@@ -760,6 +764,23 @@ function createLocalCacheLookup() {
760764
};
761765
}
762766

767+
// we do not reassign an already present style value since
768+
// if we detect the style property value again we may be
769+
// detecting styles that were added via the `from` styles.
770+
// We make use of `isDefined` here since an empty string
771+
// or null value (which is what getPropertyValue will return
772+
// for a non-existing style) will still be marked as a valid
773+
// value for the style (a falsy value implies that the style
774+
// is to be removed at the end of the animation). If we had a simple
775+
// "OR" statement then it would not be enough to catch that.
776+
function registerRestorableStyles(backup, node, properties) {
777+
forEach(properties, function(prop) {
778+
backup[prop] = isDefined(backup[prop])
779+
? backup[prop]
780+
: node.style.getPropertyValue(prop);
781+
});
782+
}
783+
763784
var $AnimateCssProvider = ['$animateProvider', function($animateProvider) {
764785
var gcsLookup = createLocalCacheLookup();
765786
var gcsStaggerLookup = createLocalCacheLookup();
@@ -860,6 +881,7 @@ var $AnimateCssProvider = ['$animateProvider', function($animateProvider) {
860881
}
861882

862883
return function init(element, options) {
884+
var restoreStyles = {};
863885
var node = getDomNode(element);
864886
if (!node
865887
|| !node.parentNode
@@ -1061,7 +1083,12 @@ var $AnimateCssProvider = ['$animateProvider', function($animateProvider) {
10611083
stagger.animationDuration === 0;
10621084
}
10631085

1064-
applyAnimationFromStyles(element, options);
1086+
if (options.from) {
1087+
if (options.cleanupStyles) {
1088+
registerRestorableStyles(restoreStyles, node, Object.keys(options.from));
1089+
}
1090+
applyAnimationFromStyles(element, options);
1091+
}
10651092

10661093
if (flags.blockTransition || flags.blockKeyframeAnimation) {
10671094
applyBlocking(maxDuration);
@@ -1128,6 +1155,13 @@ var $AnimateCssProvider = ['$animateProvider', function($animateProvider) {
11281155
applyAnimationClasses(element, options);
11291156
applyAnimationStyles(element, options);
11301157

1158+
if (Object.keys(restoreStyles).length) {
1159+
forEach(restoreStyles, function(value, prop) {
1160+
value ? node.style.setProperty(prop, value)
1161+
: node.style.removeProperty(prop);
1162+
});
1163+
}
1164+
11311165
// the reason why we have this option is to allow a synchronous closing callback
11321166
// that is fired as SOON as the animation ends (when the CSS is removed) or if
11331167
// the animation never takes off at all. A good example is a leave animation since
@@ -1322,7 +1356,12 @@ var $AnimateCssProvider = ['$animateProvider', function($animateProvider) {
13221356
}
13231357

13241358
element.on(events.join(' '), onAnimationProgress);
1325-
applyAnimationToStyles(element, options);
1359+
if (options.to) {
1360+
if (options.cleanupStyles) {
1361+
registerRestorableStyles(restoreStyles, node, Object.keys(options.to));
1362+
}
1363+
applyAnimationToStyles(element, options);
1364+
}
13261365
}
13271366

13281367
function onAnimationExpired() {

snapshot/angular-animate.min.js

Lines changed: 51 additions & 51 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.4278+sha.b3a3c6a
2+
* @license AngularJS v1.5.0-build.4279+sha.9f67da6
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.4278+sha.b3a3c6a
2+
* @license AngularJS v1.5.0-build.4279+sha.9f67da6
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.4278+sha.b3a3c6a
2+
* @license AngularJS v1.5.0-build.4279+sha.9f67da6
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.4278+sha.b3a3c6a/' +
62+
message += '\nhttp://errors.angularjs.org/1.5.0-build.4279+sha.9f67da6/' +
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.

snapshot/angular-message-format.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.4278+sha.b3a3c6a
2+
* @license AngularJS v1.5.0-build.4279+sha.9f67da6
33
* (c) 2010-2015 Google, Inc. http://angularjs.org
44
* License: MIT
55
*/

snapshot/angular-message-format.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-messages.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.4278+sha.b3a3c6a
2+
* @license AngularJS v1.5.0-build.4279+sha.9f67da6
33
* (c) 2010-2015 Google, Inc. http://angularjs.org
44
* License: MIT
55
*/

snapshot/angular-messages.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-mocks.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.4278+sha.b3a3c6a
2+
* @license AngularJS v1.5.0-build.4279+sha.9f67da6
33
* (c) 2010-2015 Google, Inc. http://angularjs.org
44
* License: MIT
55
*/

snapshot/angular-resource.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.4278+sha.b3a3c6a
2+
* @license AngularJS v1.5.0-build.4279+sha.9f67da6
33
* (c) 2010-2015 Google, Inc. http://angularjs.org
44
* License: MIT
55
*/

snapshot/angular-resource.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-route.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.4278+sha.b3a3c6a
2+
* @license AngularJS v1.5.0-build.4279+sha.9f67da6
33
* (c) 2010-2015 Google, Inc. http://angularjs.org
44
* License: MIT
55
*/

snapshot/angular-route.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-sanitize.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.4278+sha.b3a3c6a
2+
* @license AngularJS v1.5.0-build.4279+sha.9f67da6
33
* (c) 2010-2015 Google, Inc. http://angularjs.org
44
* License: MIT
55
*/

snapshot/angular-sanitize.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-scenario.js

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9190,7 +9190,7 @@ return jQuery;
91909190
}));
91919191

91929192
/**
9193-
* @license AngularJS v1.5.0-build.4278+sha.b3a3c6a
9193+
* @license AngularJS v1.5.0-build.4279+sha.9f67da6
91949194
* (c) 2010-2015 Google, Inc. http://angularjs.org
91959195
* License: MIT
91969196
*/
@@ -9249,7 +9249,7 @@ function minErr(module, ErrorConstructor) {
92499249
return match;
92509250
});
92519251

9252-
message += '\nhttp://errors.angularjs.org/1.5.0-build.4278+sha.b3a3c6a/' +
9252+
message += '\nhttp://errors.angularjs.org/1.5.0-build.4279+sha.9f67da6/' +
92539253
(module ? module + '/' : '') + code;
92549254

92559255
for (i = SKIP_INDEXES, paramPrefix = '?'; i < templateArgs.length; i++, paramPrefix = '&') {
@@ -11572,7 +11572,7 @@ function toDebugString(obj) {
1157211572
* - `codeName` – `{string}` – Code name of the release, such as "jiggling-armfat".
1157311573
*/
1157411574
var version = {
11575-
full: '1.5.0-build.4278+sha.b3a3c6a', // all of these placeholder strings will be replaced by grunt's
11575+
full: '1.5.0-build.4279+sha.9f67da6', // all of these placeholder strings will be replaced by grunt's
1157611576
major: 1, // package task
1157711577
minor: 5,
1157811578
dot: 0,
@@ -14609,6 +14609,13 @@ var $CoreAnimateCssProvider = function() {
1460914609
};
1461014610

1461114611
return function(element, options) {
14612+
// there is no point in applying the styles since
14613+
// there is no animation that goes on at all in
14614+
// this version of $animateCss.
14615+
if (options.cleanupStyles) {
14616+
options.from = options.to = null;
14617+
}
14618+
1461214619
if (options.from) {
1461314620
element.css(options.from);
1461414621
options.from = null;

snapshot/angular-touch.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.4278+sha.b3a3c6a
2+
* @license AngularJS v1.5.0-build.4279+sha.9f67da6
33
* (c) 2010-2015 Google, Inc. http://angularjs.org
44
* License: MIT
55
*/

snapshot/angular-touch.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.js

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* @license AngularJS v1.5.0-build.4278+sha.b3a3c6a
2+
* @license AngularJS v1.5.0-build.4279+sha.9f67da6
33
* (c) 2010-2015 Google, Inc. http://angularjs.org
44
* License: MIT
55
*/
@@ -57,7 +57,7 @@ function minErr(module, ErrorConstructor) {
5757
return match;
5858
});
5959

60-
message += '\nhttp://errors.angularjs.org/1.5.0-build.4278+sha.b3a3c6a/' +
60+
message += '\nhttp://errors.angularjs.org/1.5.0-build.4279+sha.9f67da6/' +
6161
(module ? module + '/' : '') + code;
6262

6363
for (i = SKIP_INDEXES, paramPrefix = '?'; i < templateArgs.length; i++, paramPrefix = '&') {
@@ -2380,7 +2380,7 @@ function toDebugString(obj) {
23802380
* - `codeName` – `{string}` – Code name of the release, such as "jiggling-armfat".
23812381
*/
23822382
var version = {
2383-
full: '1.5.0-build.4278+sha.b3a3c6a', // all of these placeholder strings will be replaced by grunt's
2383+
full: '1.5.0-build.4279+sha.9f67da6', // all of these placeholder strings will be replaced by grunt's
23842384
major: 1, // package task
23852385
minor: 5,
23862386
dot: 0,
@@ -5417,6 +5417,13 @@ var $CoreAnimateCssProvider = function() {
54175417
};
54185418

54195419
return function(element, options) {
5420+
// there is no point in applying the styles since
5421+
// there is no animation that goes on at all in
5422+
// this version of $animateCss.
5423+
if (options.cleanupStyles) {
5424+
options.from = options.to = null;
5425+
}
5426+
54205427
if (options.from) {
54215428
element.css(options.from);
54225429
options.from = null;

0 commit comments

Comments
 (0)