|
@@ -97,6 +97,31 @@ static inline CPDFAreaOfInterest CAreaOfInterestForResizeHandle(CRectEdges mask,
|
|
|
}
|
|
|
}
|
|
|
[self setNeedsDisplayAnnotationViewForPage:page];
|
|
|
+
|
|
|
+ } else if (modifiers == NSEventModifierFlagOption && [newActiveAnnotation isMovable]) {
|
|
|
+// if ([newActiveAnnotation isKindOfClass:[CPDFSquareAnnotation class]] ||
|
|
|
+// [newActiveAnnotation isKindOfClass:[CPDFCircleAnnotation class]] ||
|
|
|
+// [newActiveAnnotation isKindOfClass:[CPDFLineAnnotation class]] ||
|
|
|
+// [newActiveAnnotation isKindOfClass:[CPDFTextAnnotation class]]) {
|
|
|
+ CPDFAnnotation *newAnnotation = [newActiveAnnotation copy];
|
|
|
+ [self addAnnotation:newAnnotation toPage:page];
|
|
|
+ // [self addAnnotationWithType:CAnnotationTypeSquare selection:nil page:page bounds:newActiveAnnotation.bounds];
|
|
|
+ // newActiveAnnotation.shouldDisplay = YES;
|
|
|
+ newActiveAnnotation = newAnnotation;
|
|
|
+ [self updateActiveAnnotations:@[newActiveAnnotation]];
|
|
|
+ [self setNeedsDisplayAnnotationViewForVisiblePages];
|
|
|
+
|
|
|
+ if ([self consistentTypeWithAnnotation:newActiveAnnotation]) {
|
|
|
+ [self doDragAnnotationWithEvent:theEvent forAnnotation:newActiveAnnotation];
|
|
|
+ }
|
|
|
+ // dispatch_async(dispatch_get_main_queue(), ^{
|
|
|
+ // [self setNeedsDisplayAnnotationViewForVisiblePages];
|
|
|
+ // });
|
|
|
+// } else {
|
|
|
+// if ([self consistentTypeWithAnnotation:newActiveAnnotation]) {
|
|
|
+// [self doDragAnnotationWithEvent:theEvent forAnnotation:newActiveAnnotation];
|
|
|
+// }
|
|
|
+// }
|
|
|
} else {
|
|
|
if ([self consistentTypeWithAnnotation:newActiveAnnotation]) {
|
|
|
[self doDragAnnotationWithEvent:theEvent forAnnotation:newActiveAnnotation];
|