Browse Source

Fix zoom panning when Shift key is pressed #242

Ruben 2 months ago
parent
commit
61481031d4
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/PicView.Avalonia/ImageTransformations/Zoom.cs

+ 1 - 1
src/PicView.Avalonia/ImageTransformations/Zoom.cs

@@ -308,7 +308,7 @@ public class Zoom
     /// <param name="imageViewer">The image viewer instance on which the panning operation is performed.</param>
     /// <param name="imageViewer">The image viewer instance on which the panning operation is performed.</param>
     public void Pan(PointerEventArgs e, ImageViewer imageViewer)
     public void Pan(PointerEventArgs e, ImageViewer imageViewer)
     {
     {
-        if (!_captured || _scaleTransform == null || !IsZoomed)
+        if (!_captured || _scaleTransform == null || !IsZoomed || e.KeyModifiers == KeyModifiers.Shift)
         {
         {
             return;
             return;
         }
         }