Przeglądaj źródła

ComPDFKit.Tool(win)-多选拖拽逻辑优化

liyijie 3 miesięcy temu
rodzic
commit
68f52f08bb
1 zmienionych plików z 10 dodań i 3 usunięć
  1. 10 3
      Demo/Examples/ComPDFKit.Tool/CPDFToolManager.cs

+ 10 - 3
Demo/Examples/ComPDFKit.Tool/CPDFToolManager.cs

@@ -565,8 +565,11 @@ namespace ComPDFKit.Tool
                         }
                         else
                         {
-
                             cRect.left += (float)point.X;
+                            if (e.ZoomX == 1)
+                            {
+                                cRect.right += (float)point.X;
+                            }
                         }
                         if ((float)point.Y == 0)
                         {
@@ -575,8 +578,12 @@ namespace ComPDFKit.Tool
                         }
                         else
                         {
-                            
+
                             cRect.top += (float)point.Y;
+                            if (e.ZoomY == 1)
+                            {
+                                cRect.bottom += (float)point.Y;
+                            }
                         }
                     }
                     //Original Logic
@@ -1921,7 +1928,7 @@ namespace ComPDFKit.Tool
                         if (multiSelectedRect == null || multiSelectedRect.Children.Count == 0)
                         {
                             //Selection of mobile drawing logic
-                            if (e.mouseButtonEventArgs.LeftButton == MouseButtonState.Pressed&& createContentEditType == CPDFEditType.None)
+                            if (e.mouseButtonEventArgs.LeftButton == MouseButtonState.Pressed && createContentEditType == CPDFEditType.None)
                             {
                                 viewerTool.DrawMoveFrameSelect();
                             }