|
@@ -3230,23 +3230,28 @@ static inline CPDFAreaOfInterest CAreaOfInterestForResizeHandle(CRectEdges mask,
|
|
|
}
|
|
|
|
|
|
for (CPDFAnnotation * an in self.aCopyAnnotations) {
|
|
|
- CGPoint point = CPDFListViewSubstractPoints(an.bounds.origin, selectAnnotationBounds.origin);
|
|
|
NSRect bounds = CGRectZero;
|
|
|
- if([an isKindOfClass:[CPDFStampAnnotation class]] && self.aCopyAnnotations.count == 1) {
|
|
|
- bounds = CGRectMake(pagePoint.x + point.x-[an bounds].size.width/2, pagePoint.y-[an bounds].size.height/2+point.y, [an bounds].size.width, [an bounds].size.height);
|
|
|
+ if (sender) {
|
|
|
+ CGPoint point = CPDFListViewSubstractPoints(an.bounds.origin, selectAnnotationBounds.origin);
|
|
|
+ if([an isKindOfClass:[CPDFStampAnnotation class]] && self.aCopyAnnotations.count == 1) {
|
|
|
+ bounds = CGRectMake(pagePoint.x + point.x-[an bounds].size.width/2, pagePoint.y-[an bounds].size.height/2+point.y, [an bounds].size.width, [an bounds].size.height);
|
|
|
+ } else {
|
|
|
+ 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);
|
|
|
+ CGSize pageSize = [page boundsForBox:CPDFDisplayCropBox].size;
|
|
|
+
|
|
|
+ bounds = NSRectFromCGRect(CGRectMake(bounds.origin.x+3 * count,bounds.origin.y-3 * count,
|
|
|
+ bounds.size.width,bounds.size.height));
|
|
|
+ if (bounds.origin.x + bounds.size.width >pageSize.width) {
|
|
|
+ bounds.origin.x = pageSize.width - bounds.size.width;
|
|
|
+ }
|
|
|
+ if (bounds.origin.y - bounds.size.height < 0) {
|
|
|
+ bounds.origin.y = bounds.size.height;
|
|
|
+ }
|
|
|
} else {
|
|
|
- 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);
|
|
|
- CGSize pageSize = [page boundsForBox:CPDFDisplayCropBox].size;
|
|
|
-
|
|
|
- bounds = NSRectFromCGRect(CGRectMake(bounds.origin.x+3 * count,bounds.origin.y-3 * count,
|
|
|
- bounds.size.width,bounds.size.height));
|
|
|
- if (bounds.origin.x + bounds.size.width >pageSize.width) {
|
|
|
- bounds.origin.x = pageSize.width - bounds.size.width;
|
|
|
- }
|
|
|
- if (bounds.origin.y - bounds.size.height < 0) {
|
|
|
- bounds.origin.y = bounds.size.height;
|
|
|
+ bounds = NSRectFromCGRect(CGRectMake(an.bounds.origin.x+3 * count,an.bounds.origin.y-3 * count,
|
|
|
+ an.bounds.size.width,an.bounds.size.height));
|
|
|
}
|
|
|
if ([an isKindOfClass:[CSelfSignAnnotation class]]) {
|
|
|
CSelfSignAnnotation *originalAnnotation = (CSelfSignAnnotation *)an;
|