Fix timeline objects disappearing prematurely on wide-screens

This commit is contained in:
Salman Ahmed 2022-05-28 17:45:33 +03:00
parent 0349d92f8b
commit 02baf9a97a

View File

@ -302,7 +302,7 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
/// <summary>
/// The total amount of time visible on the timeline.
/// </summary>
public double VisibleRange => track.Length / Zoom;
public double VisibleRange => (DisplayableContent / Content.DrawWidth) * track.Length;
public SnapResult FindSnappedPositionAndTime(Vector2 screenSpacePosition, SnapType snapType = SnapType.All) =>
new SnapResult(screenSpacePosition, beatSnapProvider.SnapTime(getTimeFromPosition(Content.ToLocalSpace(screenSpacePosition))));