octicon-rss(16/)
You've already forked ionic-framework
mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-10 22:44:13 +08:00
merge release-4.8.1
Release 4.8.1
This commit is contained in:
octicon-git-branch(16/)
octicon-tag(16/)
octicon-diff(16/tw-mr-1) 6 changed files with 32 additions and 6 deletions
@@ -416,6 +416,14 @@ export class Menu implements ComponentInterface, MenuI {
|
||||
// Account for rounding errors in JS
|
||||
let newStepValue = (shouldComplete) ? 0.001 : -0.001;
|
||||
|
||||
/**
|
||||
* TODO: stepValue can sometimes return a negative
|
||||
* value, but you can't have a negative time value
|
||||
* for the cubic bezier curve (at least with web animations)
|
||||
* Not sure if the negative step value is an error or not
|
||||
*/
|
||||
const adjustedStepValue = (stepValue <= 0) ? 0.01 : stepValue;
|
||||
|
||||
/**
|
||||
* Animation will be reversed here, so need to
|
||||
* reverse the easing curve as well
|
||||
@@ -424,7 +432,7 @@ export class Menu implements ComponentInterface, MenuI {
|
||||
* to the new easing curve, as `stepValue` is going to be given
|
||||
* in terms of a linear curve.
|
||||
*/
|
||||
newStepValue += getTimeGivenProgression(new Point(0, 0), new Point(0.4, 0), new Point(0.6, 1), new Point(1, 1), stepValue);
|
||||
newStepValue += getTimeGivenProgression(new Point(0, 0), new Point(0.4, 0), new Point(0.6, 1), new Point(1, 1), adjustedStepValue);
|
||||
|
||||
this.animation
|
||||
.easing('cubic-bezier(0.4, 0.0, 0.6, 1)')
|
||||
|
||||
@@ -37,7 +37,13 @@ export const createSwipeBackGesture = (
|
||||
realDur = Math.min(dur, 540);
|
||||
}
|
||||
|
||||
onEndHandler(shouldComplete, stepValue, realDur);
|
||||
/**
|
||||
* TODO: stepValue can sometimes return a negative
|
||||
* value, but you can't have a negative time value
|
||||
* for the cubic bezier curve (at least with web animations)
|
||||
* Not sure if the negative step value is an error or not
|
||||
*/
|
||||
onEndHandler(shouldComplete, (stepValue <= 0) ? 0.01 : stepValue, realDur);
|
||||
};
|
||||
|
||||
return createGesture({
|
||||
|
||||
Reference in New Issue
Block a user