mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 12:29:55 +08:00
perf(animation): set after styles should not be recursive
This commit is contained in:
@ -414,7 +414,7 @@ export class Animation {
|
|||||||
|
|
||||||
// since there was no animation, immediately run the after
|
// since there was no animation, immediately run the after
|
||||||
// ******** DOM WRITE ****************
|
// ******** DOM WRITE ****************
|
||||||
this._afterAnimation();
|
this._setAfterStyles();
|
||||||
|
|
||||||
// this animation has no duration, so it has finished
|
// this animation has no duration, so it has finished
|
||||||
// other animations could still be running
|
// other animations could still be running
|
||||||
@ -513,7 +513,7 @@ export class Animation {
|
|||||||
|
|
||||||
// set the after styles
|
// set the after styles
|
||||||
// ******** DOM WRITE ****************
|
// ******** DOM WRITE ****************
|
||||||
this._afterAnimation();
|
this._setAfterStyles();
|
||||||
|
|
||||||
// remove the will-change properties
|
// remove the will-change properties
|
||||||
// ******** DOM WRITE ****************
|
// ******** DOM WRITE ****************
|
||||||
@ -789,13 +789,8 @@ export class Animation {
|
|||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
* DOM WRITE
|
* DOM WRITE
|
||||||
* RECURSION
|
|
||||||
*/
|
*/
|
||||||
_afterAnimation() {
|
_setAfterStyles() {
|
||||||
for (var i = 0; i < this._cL; i++) {
|
|
||||||
this._c[i]._afterAnimation();
|
|
||||||
}
|
|
||||||
|
|
||||||
let ele: HTMLElement;
|
let ele: HTMLElement;
|
||||||
for (var i = 0; i < this._eL; i++) {
|
for (var i = 0; i < this._eL; i++) {
|
||||||
ele = this._e[i];
|
ele = this._e[i];
|
||||||
@ -991,7 +986,7 @@ export class Animation {
|
|||||||
// ******** DOM WRITE ****************
|
// ******** DOM WRITE ****************
|
||||||
this._progress(stepValue);
|
this._progress(stepValue);
|
||||||
this._willChg(false);
|
this._willChg(false);
|
||||||
this._afterAnimation();
|
this._setAfterStyles();
|
||||||
this._didFinish(shouldComplete);
|
this._didFinish(shouldComplete);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user