mirror of
https://github.com/osukey/osukey.git
synced 2025-08-07 00:23:59 +09:00
Merge pull request #19296 from smoogipoo/fix-timeline-focus-point
Fix timeline zoom focus point when using zoom buttons
This commit is contained in:
@ -157,7 +157,9 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
|
|||||||
private void setZoomTarget(float newZoom, float? focusPoint = null)
|
private void setZoomTarget(float newZoom, float? focusPoint = null)
|
||||||
{
|
{
|
||||||
zoomTarget = Math.Clamp(newZoom, MinZoom, MaxZoom);
|
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();
|
OnZoomChanged();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user