|
@@ -216,7 +216,7 @@ static inline CPDFAreaOfInterest CAreaOfInterestForResizeHandle(CRectEdges mask,
|
|
!self.popOver &&
|
|
!self.popOver &&
|
|
newActiveAnnotation.toolTipsString.length > 0 &&
|
|
newActiveAnnotation.toolTipsString.length > 0 &&
|
|
([newActiveAnnotation isKindOfClass:[CPDFTextAnnotation class]] || [newActiveAnnotation isKindOfClass:[CPDFLinkAnnotation class]] || [newActiveAnnotation isKindOfClass:[CPDFWidgetAnnotation class]])) {
|
|
([newActiveAnnotation isKindOfClass:[CPDFTextAnnotation class]] || [newActiveAnnotation isKindOfClass:[CPDFLinkAnnotation class]] || [newActiveAnnotation isKindOfClass:[CPDFWidgetAnnotation class]])) {
|
|
- [self performSelector:@selector(showHUDHint:) withObject:newActiveAnnotation afterDelay:1.0];
|
|
|
|
|
|
+ [self performSelector:@selector(showHUDHint:) withObject:newActiveAnnotation afterDelay:0.3];
|
|
} else if ([self isSupportSelectAnnotation] && newActiveAnnotation && [newActiveAnnotation isKindOfClass:[CPDFRedactAnnotation class]] && (self.hoverAnnotation == newActiveAnnotation)) {
|
|
} else if ([self isSupportSelectAnnotation] && newActiveAnnotation && [newActiveAnnotation isKindOfClass:[CPDFRedactAnnotation class]] && (self.hoverAnnotation == newActiveAnnotation)) {
|
|
[(CPDFRedactAnnotation *)newActiveAnnotation setDrawRedactionsAsRedacted:YES];
|
|
[(CPDFRedactAnnotation *)newActiveAnnotation setDrawRedactionsAsRedacted:YES];
|
|
[self setNeedsDisplayAnnotationViewForPage:page];
|
|
[self setNeedsDisplayAnnotationViewForPage:page];
|
|
@@ -1965,7 +1965,7 @@ static inline CPDFAreaOfInterest CAreaOfInterestForResizeHandle(CRectEdges mask,
|
|
} else {
|
|
} else {
|
|
CPDFAnnotationModel *annotationModel = [[CPDFAnnotationModel alloc]initWithAnnotationType:self.annotationType];
|
|
CPDFAnnotationModel *annotationModel = [[CPDFAnnotationModel alloc]initWithAnnotationType:self.annotationType];
|
|
CGRect bounds = CGRectZero;
|
|
CGRect bounds = CGRectZero;
|
|
- CGFloat defaultWidth = annotationModel.noteWidth;
|
|
|
|
|
|
+ CGFloat defaultWidth = annotation.bounds.size.width;
|
|
CGFloat defaultHeight = annotationModel.noteHeight;
|
|
CGFloat defaultHeight = annotationModel.noteHeight;
|
|
NSSize defaultSize = ([page rotation] % 180 == 0) ? NSMakeSize(defaultWidth, defaultHeight) : NSMakeSize(defaultHeight, defaultWidth);
|
|
NSSize defaultSize = ([page rotation] % 180 == 0) ? NSMakeSize(defaultWidth, defaultHeight) : NSMakeSize(defaultHeight, defaultWidth);
|
|
|
|
|
|
@@ -3012,8 +3012,15 @@ static inline CPDFAreaOfInterest CAreaOfInterestForResizeHandle(CRectEdges mask,
|
|
}
|
|
}
|
|
|
|
|
|
if (self.aCopyAnnotations.count > 0 ) {
|
|
if (self.aCopyAnnotations.count > 0 ) {
|
|
|
|
+ CPDFAnnotation * an = self.aCopyAnnotations.firstObject;
|
|
|
|
+ CGRect selectAnnotationBounds = an.bounds;
|
|
|
|
+ for (CPDFAnnotation *annotation in self.aCopyAnnotations) {
|
|
|
|
+ selectAnnotationBounds = CPDFListViewIntersectionAndSetRect(annotation.bounds, selectAnnotationBounds);
|
|
|
|
+ }
|
|
|
|
+
|
|
for (CPDFAnnotation * an in self.aCopyAnnotations) {
|
|
for (CPDFAnnotation * an in self.aCopyAnnotations) {
|
|
- NSRect bounds = CGRectMake(pagePoint.x, pagePoint.y-[an bounds].size.height, [an bounds].size.width, [an bounds].size.height);
|
|
|
|
|
|
+ CGPoint point = CPDFListViewSubstractPoints(an.bounds.origin, selectAnnotationBounds.origin);
|
|
|
|
+ NSRect bounds = CGRectMake(pagePoint.x + point.x, pagePoint.y-[an bounds].size.height+point.y, [an bounds].size.width, [an bounds].size.height);
|
|
bounds = CPDFListViewConstrainRect(bounds, [page boundsForBox:[self displayBox]],[CPDFListViewConfig defaultManager].annotationBorderOffset.floatValue);
|
|
bounds = CPDFListViewConstrainRect(bounds, [page boundsForBox:[self displayBox]],[CPDFListViewConfig defaultManager].annotationBorderOffset.floatValue);
|
|
CGSize pageSize = [page boundsForBox:CPDFDisplayCropBox].size;
|
|
CGSize pageSize = [page boundsForBox:CPDFDisplayCropBox].size;
|
|
|
|
|
|
@@ -3348,6 +3355,13 @@ static inline CPDFAreaOfInterest CAreaOfInterestForResizeHandle(CRectEdges mask,
|
|
break;
|
|
break;
|
|
|
|
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ if ([self.activeAnnotation isKindOfClass:[CPDFFreeTextAnnotation class]]) {
|
|
|
|
+ CPDFFreeTextAnnotation *freeTextAnnotation = self.activeAnnotation;
|
|
|
|
+ if([self isEditWithCurrentFreeText:freeTextAnnotation])
|
|
|
|
+ [self commitEditAnnotationFreeText:freeTextAnnotation];
|
|
|
|
+ }
|
|
|
|
+
|
|
CPDFAnnotationModel *annotationModel = [[CPDFAnnotationModel alloc] initWithPDFAnnotations:self.activeAnnotations];
|
|
CPDFAnnotationModel *annotationModel = [[CPDFAnnotationModel alloc] initWithPDFAnnotations:self.activeAnnotations];
|
|
annotationModel.fontName = fontName;
|
|
annotationModel.fontName = fontName;
|
|
[self setNeedsDisplayAnnotation:self.activeAnnotation];
|
|
[self setNeedsDisplayAnnotation:self.activeAnnotation];
|