Browse Source

Invert delta if [SHIFT] is pressed

pull/7520/head
Tim 5 years ago
parent
commit
dc937485e9
  1. 5
      src/Avalonia.Input/MouseDevice.cs

5
src/Avalonia.Input/MouseDevice.cs

@ -334,6 +334,11 @@ namespace Avalonia.Input
var hit = HitTest(root, p); var hit = HitTest(root, p);
var source = GetSource(hit); var source = GetSource(hit);
if (inputModifiers == KeyModifiers.Shift)
{
delta = new Vector(delta.Y, delta.X);
}
if (source is not null) if (source is not null)
{ {
var e = new PointerWheelEventArgs(source, _pointer, root, p, timestamp, props, inputModifiers, delta); var e = new PointerWheelEventArgs(source, _pointer, root, p, timestamp, props, inputModifiers, delta);

Loading…
Cancel
Save