mirror of
https://github.com/osukey/osukey.git
synced 2025-08-06 16:13:57 +09:00
Fix slight Y position offset in HandleDrag
This commit is contained in:
@ -309,7 +309,8 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
|
|||||||
public override bool HandleDrag(MouseButtonEvent e)
|
public override bool HandleDrag(MouseButtonEvent e)
|
||||||
{
|
{
|
||||||
// The dragbox should only be active if the mouseDownPosition.Y is within this drawable's bounds.
|
// The dragbox should only be active if the mouseDownPosition.Y is within this drawable's bounds.
|
||||||
if (DrawRectangle.Top > e.MouseDownPosition.Y || DrawRectangle.Bottom < e.MouseDownPosition.Y)
|
float localY = ToLocalSpace(e.ScreenSpaceMouseDownPosition).Y;
|
||||||
|
if (DrawRectangle.Top > localY || DrawRectangle.Bottom < localY)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
selectionStart ??= e.MouseDownPosition.X / timeline.CurrentZoom;
|
selectionStart ??= e.MouseDownPosition.X / timeline.CurrentZoom;
|
||||||
|
Reference in New Issue
Block a user