mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 20:33:32 +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') {
|
} else if (typeof ele === 'string') {
|
||||||
ele = doc.querySelectorAll(ele);
|
ele = document.querySelectorAll(ele);
|
||||||
for (i = 0; i < ele.length; i++) {
|
for (i = 0; i < ele.length; i++) {
|
||||||
this._addEle(ele[i]);
|
this._addEle(ele[i]);
|
||||||
}
|
}
|
||||||
@ -378,8 +378,10 @@ export class Animation {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_clearAsync() {
|
_clearAsync() {
|
||||||
this._unregTrans && this._unregTrans();
|
if (this._tmr) {
|
||||||
clearTimeout(this._tmr);
|
this._unregTrans && this._unregTrans();
|
||||||
|
clearTimeout(this._tmr);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_progress(stepValue: number) {
|
_progress(stepValue: number) {
|
||||||
@ -781,8 +783,6 @@ interface EffectState {
|
|||||||
unit: string;
|
unit: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
const doc: any = document;
|
|
||||||
|
|
||||||
const TRANSFORMS = {
|
const TRANSFORMS = {
|
||||||
'translateX':1, 'translateY':1, 'translateZ':1,
|
'translateX':1, 'translateY':1, 'translateZ':1,
|
||||||
'scale':1, 'scaleX':1, 'scaleY':1, 'scaleZ':1,
|
'scale':1, 'scaleX':1, 'scaleY':1, 'scaleZ':1,
|
||||||
|
Reference in New Issue
Block a user