Skip to content

Commit 3a2ff85

Browse files
committed
perf(animation): set after styles should not be recursive
1 parent a7042e3 commit 3a2ff85

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

src/animations/animation.ts

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ export class Animation {
414414

415415
// since there was no animation, immediately run the after
416416
// ******** DOM WRITE ****************
417-
this._afterAnimation();
417+
this._setAfterStyles();
418418

419419
// this animation has no duration, so it has finished
420420
// other animations could still be running
@@ -513,7 +513,7 @@ export class Animation {
513513

514514
// set the after styles
515515
// ******** DOM WRITE ****************
516-
this._afterAnimation();
516+
this._setAfterStyles();
517517

518518
// remove the will-change properties
519519
// ******** DOM WRITE ****************
@@ -789,13 +789,8 @@ export class Animation {
789789
/**
790790
* @private
791791
* DOM WRITE
792-
* RECURSION
793792
*/
794-
_afterAnimation() {
795-
for (var i = 0; i < this._cL; i++) {
796-
this._c[i]._afterAnimation();
797-
}
798-
793+
_setAfterStyles() {
799794
let ele: HTMLElement;
800795
for (var i = 0; i < this._eL; i++) {
801796
ele = this._e[i];
@@ -991,7 +986,7 @@ export class Animation {
991986
// ******** DOM WRITE ****************
992987
this._progress(stepValue);
993988
this._willChg(false);
994-
this._afterAnimation();
989+
this._setAfterStyles();
995990
this._didFinish(shouldComplete);
996991

997992
} else {

0 commit comments

Comments
 (0)