Browse Source

【注释】隐藏“Form注释创建不能到边框外”

wanjun 9 months ago
parent
commit
47f677d5d9

+ 4 - 5
PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListViewExtension/CPDFListView+Event.m

@@ -3488,11 +3488,10 @@ static inline CPDFAreaOfInterest CAreaOfInterestForResizeHandle(CRectEdges mask,
             if ([theEvent type] == NSLeftMouseUp) {
                 CGRect bounds =CGRectMake(pagePoint.x - 10, pagePoint.y - 10, 20, 20);
                 
-                CGFloat mouseOffset = [self unitWidthOnPage:page];
-                CGPoint zPoint = pagePoint;
-                [self pageAndPoint:&zPoint forEvent:theEvent nearest:YES];
-                CGRect zRect = CGRectMake(pagePoint.x-2*mouseOffset, pagePoint.y-2*mouseOffset, 4*mouseOffset, 4*mouseOffset);
-                if (CGRectContainsPoint(zRect, zPoint)) {continue;}
+//                CGFloat mouseOffset = [self unitWidthOnPage:page];
+//                CGPoint zPoint = pagePoint;
+//                CGRect zRect = CGRectMake(pagePoint.x-2*mouseOffset, pagePoint.y-2*mouseOffset, 4*mouseOffset, 4*mouseOffset);
+//                if (CGRectContainsPoint(zRect, pagePoint)) {continue;}
 
                 [self addFormAnnotationWithType:self.annotationType selection:nil page:page bounds:bounds];
                 break;