mirror of
https://github.com/ppy/osu.git
synced 2025-02-22 21:43:52 +08:00
Change order of application to avoid bias to side with more room to drag
Co-authored-by: Bartłomiej Dach <dach.bartlomiej@gmail.com>
This commit is contained in:
parent
cc4ed0ff3f
commit
aed7ba9508
@ -230,7 +230,7 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
amount = Math.Sign(amount) * Math.Min(max_velocity, Math.Abs(MathF.Pow(amount, 2) / (MathF.Pow(scroll_tolerance, 2))));
|
amount = Math.Sign(amount) * Math.Min(max_velocity, MathF.Pow(Math.Clamp(Math.Abs(amount), 0, scroll_tolerance), 2));
|
||||||
dragTimeAccumulated += (float)Clock.ElapsedFrameTime;
|
dragTimeAccumulated += (float)Clock.ElapsedFrameTime;
|
||||||
|
|
||||||
timeline.ScrollBy(amount * (float)Clock.ElapsedFrameTime * Math.Min(1, dragTimeAccumulated / time_ramp_multiplier));
|
timeline.ScrollBy(amount * (float)Clock.ElapsedFrameTime * Math.Min(1, dragTimeAccumulated / time_ramp_multiplier));
|
||||||
|
Loading…
Reference in New Issue
Block a user