mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
fix(menu): improves menu swipe animation
This commit is contained in:
@@ -1016,7 +1016,7 @@ export class Animation {
|
||||
if (dur < 0) {
|
||||
dur = this._dur;
|
||||
}
|
||||
this._isAsync = (currentStepValue > 0.05 && currentStepValue < 0.95 && dur > 30);
|
||||
this._isAsync = (dur > 30);
|
||||
|
||||
this._progressEnd(shouldComplete, stepValue, dur, this._isAsync);
|
||||
|
||||
|
||||
@@ -59,7 +59,8 @@ export class MenuType {
|
||||
done(isOpen);
|
||||
}, true);
|
||||
|
||||
let dur = this.ani.getDuration() / (Math.abs(velocity) + 1);
|
||||
let factor = 1 - Math.min(Math.abs(velocity) / 4, 0.7);
|
||||
let dur = this.ani.getDuration() * factor;
|
||||
|
||||
this.ani.progressEnd(shouldComplete, currentStepValue, dur);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user