Ver Fonte

注释 - 双击弹出指定注释的批注弹窗

chenrongqian@kdanmobile.com há 1 ano atrás
pai
commit
2e04485f2c

+ 15 - 2
PDF Office/ViewModels/Tools/AnnotToolContentViewModel.Command.cs

@@ -155,8 +155,21 @@ namespace PDF_Office.ViewModels.Tools
                     var type = CurrentSelectedAnnot.EventType;
                     if (type != AnnotArgsType.AnnotSticky && type != AnnotArgsType.AnnotFreeText &&
                         type != AnnotArgsType.AnnotHighlight && type != AnnotArgsType.AnnotUnderline && type != AnnotArgsType.AnnotStrikeout)
-                  
-                        PopAnnotNoteText(CurrentSelectedAnnot);
+                    {
+                        var rect = CurrentSelectedAnnot.ClientRect;
+                        var ui = PDFViewer.Parent as ContentControl;
+                        if (ui != null)
+                        {
+                            var point = e.GetPosition(ui);
+                            if (rect.Left < point.X && rect.Top < point.Y && (rect.Width + rect.X) >= point.X && (rect.Height + rect.Y) >= point.Y)
+                            {
+                                PopAnnotNoteText(CurrentSelectedAnnot);
+                            }
+
+                        }
+
+                    }
+                       
                 }
                    
             }