Browse Source

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

liyijie 3 months ago
parent
commit
68f52f08bb
1 changed files with 10 additions and 3 deletions
  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();
                             }