mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 12:29:55 +08:00
chore(animation): only clear async when async used
This commit is contained in:
@ -70,7 +70,7 @@ export class Animation {
|
||||
}
|
||||
|
||||
} else if (typeof ele === 'string') {
|
||||
ele = doc.querySelectorAll(ele);
|
||||
ele = document.querySelectorAll(ele);
|
||||
for (i = 0; i < ele.length; i++) {
|
||||
this._addEle(ele[i]);
|
||||
}
|
||||
@ -378,8 +378,10 @@ export class Animation {
|
||||
}
|
||||
|
||||
_clearAsync() {
|
||||
this._unregTrans && this._unregTrans();
|
||||
clearTimeout(this._tmr);
|
||||
if (this._tmr) {
|
||||
this._unregTrans && this._unregTrans();
|
||||
clearTimeout(this._tmr);
|
||||
}
|
||||
}
|
||||
|
||||
_progress(stepValue: number) {
|
||||
@ -781,8 +783,6 @@ interface EffectState {
|
||||
unit: string;
|
||||
}
|
||||
|
||||
const doc: any = document;
|
||||
|
||||
const TRANSFORMS = {
|
||||
'translateX':1, 'translateY':1, 'translateZ':1,
|
||||
'scale':1, 'scaleX':1, 'scaleY':1, 'scaleZ':1,
|
||||
|
Reference in New Issue
Block a user