mirror of
https://github.com/ppy/osu.git
synced 2025-01-28 08:43:20 +08:00
Fix timeline zoom focus point when using buttons
This commit is contained in:
parent
72916d708c
commit
e1df50c8ff
@ -157,7 +157,9 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
|
||||
private void setZoomTarget(float newZoom, float? focusPoint = null)
|
||||
{
|
||||
zoomTarget = Math.Clamp(newZoom, MinZoom, MaxZoom);
|
||||
transformZoomTo(zoomTarget, focusPoint ?? DrawWidth / 2, ZoomDuration, ZoomEasing);
|
||||
focusPoint ??= zoomedContent.ToLocalSpace(ToScreenSpace(new Vector2(DrawWidth / 2, 0))).X;
|
||||
|
||||
transformZoomTo(zoomTarget, focusPoint.Value, ZoomDuration, ZoomEasing);
|
||||
|
||||
OnZoomChanged();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user