Make scrolling only zoom the timeline

This commit is contained in:
smoogipoo 2018-06-12 15:49:42 +09:00
parent b90cdfbfd1
commit aaf2f66594
1 changed files with 2 additions and 3 deletions

View File

@ -99,10 +99,9 @@ protected override void Update()
protected override bool OnScroll(InputState state)
{
if (!state.Keyboard.ControlPressed)
if (state.Mouse.HasPreciseScroll)
return base.OnScroll(state);
setZoomTarget(zoomTarget + state.Mouse.ScrollDelta.X, zoomedContent.ToLocalSpace(state.Mouse.NativeState.Position).X);
setZoomTarget(zoomTarget + state.Mouse.ScrollDelta.Y, zoomedContent.ToLocalSpace(state.Mouse.NativeState.Position).X);
return true;
}