fix(menu): fix jump when dragging open (#20288)

fixes #20286
This commit is contained in:
Liam DeBeasi
2020-01-24 15:22:51 -05:00
committed by GitHub
parent 09d951ae1b
commit b14471178e
2 changed files with 3 additions and 3 deletions

View File

@ -442,7 +442,7 @@ AFTER:
* 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;
const adjustedStepValue = (stepValue < 0) ? 0.01 : stepValue;
/**
* Animation will be reversed here, so need to
@ -452,7 +452,7 @@ AFTER:
* to the new easing curve, as `stepValue` is going to be given
* in terms of a linear curve.
*/
newStepValue += getTimeGivenProgression([0, 0], [0.4, 0], [0.6, 1], [1, 1], clamp(0, adjustedStepValue, 1))[0];
newStepValue += getTimeGivenProgression([0, 0], [0.4, 0], [0.6, 1], [1, 1], clamp(0, adjustedStepValue, 0.9999))[0] || 0;
const playTo = (this._isOpen) ? !shouldComplete : shouldComplete;