@angular/animations 9.0.0-rc.6 → 9.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/animations.d.ts +2 -2
- package/browser/browser.d.ts +4 -4
- package/browser/testing/testing.d.ts +2 -2
- package/browser/testing.d.ts +2 -2
- package/browser.d.ts +2 -2
- package/bundles/animations-browser-testing.umd.js +2 -2
- package/bundles/animations-browser-testing.umd.min.js +2 -2
- package/bundles/animations-browser-testing.umd.min.js.map +1 -1
- package/bundles/animations-browser.umd.js +17 -11
- package/bundles/animations-browser.umd.js.map +1 -1
- package/bundles/animations-browser.umd.min.js +3 -3
- package/bundles/animations-browser.umd.min.js.map +1 -1
- package/bundles/animations.umd.js +2 -2
- package/bundles/animations.umd.min.js +2 -2
- package/bundles/animations.umd.min.js.map +1 -1
- package/esm2015/animations.externs.js +1 -1
- package/esm2015/browser/browser.externs.js +4 -4
- package/esm2015/browser/src/render/transition_animation_engine.js +28 -13
- package/esm2015/src/version.js +1 -1
- package/esm5/browser/src/render/transition_animation_engine.js +16 -10
- package/esm5/src/version.js +1 -1
- package/fesm2015/animations.js +2 -2
- package/fesm2015/browser/testing.js +2 -2
- package/fesm2015/browser.js +29 -14
- package/fesm2015/browser.js.map +1 -1
- package/fesm5/animations.js +2 -2
- package/fesm5/browser/testing.js +2 -2
- package/fesm5/browser.js +17 -11
- package/fesm5/browser.js.map +1 -1
- package/package.json +2 -2
package/fesm5/animations.js
CHANGED
package/fesm5/browser/testing.js
CHANGED
package/fesm5/browser.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v9.0.0
|
|
3
|
-
* (c) 2010-
|
|
2
|
+
* @license Angular v9.0.0
|
|
3
|
+
* (c) 2010-2020 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
6
6
|
|
|
@@ -2545,13 +2545,13 @@ var AnimationTransitionNamespace = /** @class */ (function () {
|
|
|
2545
2545
|
this._engine.playersByElement.delete(element);
|
|
2546
2546
|
}
|
|
2547
2547
|
};
|
|
2548
|
-
AnimationTransitionNamespace.prototype._signalRemovalForInnerTriggers = function (rootElement, context
|
|
2548
|
+
AnimationTransitionNamespace.prototype._signalRemovalForInnerTriggers = function (rootElement, context) {
|
|
2549
2549
|
var _this = this;
|
|
2550
|
-
|
|
2550
|
+
var elements = this._engine.driver.query(rootElement, NG_TRIGGER_SELECTOR, true);
|
|
2551
2551
|
// emulate a leave animation for all inner nodes within this node.
|
|
2552
2552
|
// If there are no animations found for any of the nodes then clear the cache
|
|
2553
2553
|
// for the element.
|
|
2554
|
-
|
|
2554
|
+
elements.forEach(function (elm) {
|
|
2555
2555
|
// this means that an inner remove() operation has already kicked off
|
|
2556
2556
|
// the animation on this element...
|
|
2557
2557
|
if (elm[REMOVAL_FLAG])
|
|
@@ -2564,6 +2564,9 @@ var AnimationTransitionNamespace = /** @class */ (function () {
|
|
|
2564
2564
|
_this.clearElementCache(elm);
|
|
2565
2565
|
}
|
|
2566
2566
|
});
|
|
2567
|
+
// If the child elements were removed along with the parent, their animations might not
|
|
2568
|
+
// have completed. Clear all the elements from the cache so we don't end up with a memory leak.
|
|
2569
|
+
this._engine.afterFlushAnimationsDone(function () { return elements.forEach(function (elm) { return _this.clearElementCache(elm); }); });
|
|
2567
2570
|
};
|
|
2568
2571
|
AnimationTransitionNamespace.prototype.triggerLeaveAnimation = function (element, context, destroyAfterComplete, defaultToFallback) {
|
|
2569
2572
|
var _this = this;
|
|
@@ -2623,7 +2626,7 @@ var AnimationTransitionNamespace = /** @class */ (function () {
|
|
|
2623
2626
|
var _this = this;
|
|
2624
2627
|
var engine = this._engine;
|
|
2625
2628
|
if (element.childElementCount) {
|
|
2626
|
-
this._signalRemovalForInnerTriggers(element, context
|
|
2629
|
+
this._signalRemovalForInnerTriggers(element, context);
|
|
2627
2630
|
}
|
|
2628
2631
|
// this means that a * => VOID animation was detected and kicked off
|
|
2629
2632
|
if (this.triggerLeaveAnimation(element, context, true))
|
|
@@ -2662,11 +2665,14 @@ var AnimationTransitionNamespace = /** @class */ (function () {
|
|
|
2662
2665
|
engine.markElementAsRemoved(this.id, element, false, context);
|
|
2663
2666
|
}
|
|
2664
2667
|
else {
|
|
2665
|
-
|
|
2666
|
-
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
|
|
2668
|
+
var removalFlag = element[REMOVAL_FLAG];
|
|
2669
|
+
if (!removalFlag || removalFlag === NULL_REMOVAL_STATE) {
|
|
2670
|
+
// we do this after the flush has occurred such
|
|
2671
|
+
// that the callbacks can be fired
|
|
2672
|
+
engine.afterFlush(function () { return _this.clearElementCache(element); });
|
|
2673
|
+
engine.destroyInnerAnimations(element);
|
|
2674
|
+
engine._onRemovalComplete(element, context);
|
|
2675
|
+
}
|
|
2670
2676
|
}
|
|
2671
2677
|
};
|
|
2672
2678
|
AnimationTransitionNamespace.prototype.insertNode = function (element, parent) { addClass(element, this._hostClassName); };
|