Browse Source

ComPDFKit(win) - 修复测量、线形、云线注释贴边时滑动鼠标会导致选中框跟随屏幕漂移问题

liuaoran 1 week ago
parent
commit
0496a4a1e7

+ 3 - 2
Demo/Examples/ComPDFKit.Tool/CPDFViewerTool.AnnotEdit.cs

@@ -79,7 +79,7 @@ namespace ComPDFKit.Tool
             }
         }
 
-        public void CleanEditAnnot()
+        public void CleanEditAnnot(bool isDrawEditAnnot = false)
         {
             Point point = Mouse.GetPosition(this);
             BaseLayer baseLayer = PDFViewer.GetViewForTag(annotEditViewTag);
@@ -87,9 +87,10 @@ namespace ComPDFKit.Tool
             if (annotEdit != null)  
             {
                 annotEdit.ClearDraw();
-                IsDrawEditAnnot = false;
+                IsDrawEditAnnot = isDrawEditAnnot;
             }
         }
+  
 
         private void DrawEditAnnotLayer()
         {

+ 2 - 2
Demo/Examples/ComPDFKit.Tool/CPDFViewerTool.xaml.cs

@@ -145,8 +145,7 @@ namespace ComPDFKit.Tool
             this.isContinueCreateTextEdit = isContinueCreateTextEdit;
             CanAddTextEdit = true;
         }
-
-
+        
         /// <summary>
         ///  Does it support multiple selection
         /// </summary>
@@ -1032,6 +1031,7 @@ namespace ComPDFKit.Tool
                     else
                     {
                         SelectedAnnot(null);
+                        CleanEditAnnot(true);
                     }
                 }
                 else if (selectedPageIndex != -1 && selectedAnnotIndex != -1)