|
@@ -126,14 +126,8 @@ 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];
|
|
@@ -284,7 +278,7 @@ static inline CPDFAreaOfInterest CAreaOfInterestForResizeHandle(CRectEdges mask,
|
|
|
- (void)mouseMoved:(NSEvent *)event {
|
|
|
if(self.isPresentationMode) {
|
|
|
NSPoint tPoint = [event locationInView:self];
|
|
|
-
|
|
|
+
|
|
|
if(CGRectContainsPoint(self.bounds, tPoint)) {
|
|
|
if(self.presentationDrawView && self.presentationDrawView.isHidden == NO) {
|
|
|
NSImage *cursorImage = [[NSImage imageNamed:@"KMPresentationImageNameMouse"] copy];
|
|
@@ -309,73 +303,15 @@ static inline CPDFAreaOfInterest CAreaOfInterestForResizeHandle(CRectEdges mask,
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
if (self.isEditing) {
|
|
|
-// [super mouseMoved:event];
|
|
|
return;
|
|
|
}
|
|
|
NSPoint point = NSZeroPoint;
|
|
|
CPDFPage *page = [self pageAndPoint:&point forEvent:event nearest:YES];
|
|
|
- id annotations = [page annotations];
|
|
|
-
|
|
|
- CPDFAnnotation *newActiveAnnotation = nil;
|
|
|
- for (CPDFAnnotation *annotation in annotations) {
|
|
|
- if ([annotation hitTest:point] && [annotation annotationShouldDisplay]) {
|
|
|
- newActiveAnnotation = annotation;
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
- CPDFAnnotation *clickNewActiveAnnotation = newActiveAnnotation;
|
|
|
- if(![newActiveAnnotation isForm] && self.toolMode == CFormToolMode) {
|
|
|
- newActiveAnnotation = nil;
|
|
|
- }
|
|
|
-
|
|
|
- if ([clickNewActiveAnnotation isKindOfClass:[CPDFLinkAnnotation class]]) {
|
|
|
- [[KMImageToolTipWindow shared] showForImageContext:newActiveAnnotation at:NSZeroPoint];
|
|
|
- }else{
|
|
|
- [[KMImageToolTipWindow shared] fadeOut];
|
|
|
- }
|
|
|
-
|
|
|
- if (([newActiveAnnotation isForm]) && self.toolMode != CFormToolMode) {
|
|
|
- newActiveAnnotation = nil;
|
|
|
- }
|
|
|
-
|
|
|
- // if([newActiveAnnotation isKindOfClass:[CPDFInkAnnotation class]]) {
|
|
|
- if(self.annotationType == CAnnotationTypeInk || self.annotationType == CAnnotationTypeEraser)
|
|
|
- newActiveAnnotation = nil;
|
|
|
- // }
|
|
|
- if (![self consistentTypeWithAnnotation:newActiveAnnotation]) {
|
|
|
- newActiveAnnotation = nil;
|
|
|
- }
|
|
|
-
|
|
|
- if(CRedactToolMode == self.toolMode && ![newActiveAnnotation isKindOfClass:[CPDFRedactAnnotation class]])
|
|
|
- newActiveAnnotation = nil;
|
|
|
-
|
|
|
- [CPDFListView cancelPreviousPerformRequestsWithTarget:self selector:@selector(showHUDHint:) object:self.hoverAnnotation];
|
|
|
- if ((CNoteToolMode == self.toolMode || CTextToolMode == self.toolMode || CRedactErasureToolMode == self.toolMode) &&
|
|
|
- clickNewActiveAnnotation &&
|
|
|
- (self.hoverAnnotation == newActiveAnnotation) &&
|
|
|
- !self.popOver &&
|
|
|
- clickNewActiveAnnotation.toolTipsString.length > 0 &&
|
|
|
- ([clickNewActiveAnnotation isKindOfClass:[CPDFTextAnnotation class]] || [clickNewActiveAnnotation isKindOfClass:[CPDFLinkAnnotation class]] || [clickNewActiveAnnotation isKindOfClass:[CPDFWidgetAnnotation class]])) {
|
|
|
- if ([newActiveAnnotation isKindOfClass:[CPDFTextAnnotation class]] || [newActiveAnnotation isKindOfClass:[CPDFLinkAnnotation class]]) {
|
|
|
- [self performSelector:@selector(showHUDHint:) withObject:newActiveAnnotation afterDelay:0.f];
|
|
|
- } else {
|
|
|
- [self performSelector:@selector(showHUDHint:) withObject:newActiveAnnotation afterDelay:0.3];
|
|
|
- }
|
|
|
- } else if ([self isSupportSelectAnnotation] && newActiveAnnotation && [newActiveAnnotation isKindOfClass:[CPDFRedactAnnotation class]] && (self.hoverAnnotation == newActiveAnnotation)) {
|
|
|
- [(CPDFRedactAnnotation *)newActiveAnnotation setDrawRedactionsAsRedacted:YES];
|
|
|
- [self setNeedsDisplayAnnotationViewForPage:page];
|
|
|
- } else if([self isSupportSelectAnnotation] && self.hoverAnnotation && [self.hoverAnnotation isKindOfClass:[CPDFRedactAnnotation class]]){
|
|
|
- [(CPDFRedactAnnotation *)self.hoverAnnotation setDrawRedactionsAsRedacted:NO];
|
|
|
- [self setNeedsDisplayAnnotationViewForPage:page];
|
|
|
- } else {
|
|
|
- [self hidenHUDHint];
|
|
|
- }
|
|
|
|
|
|
if(self.clickLineAnnotation && self.isClickDoubleCreatLine) {
|
|
|
- NSPoint pagePoint = NSZeroPoint;
|
|
|
- CPDFPage *page = [self pageAndPoint:&pagePoint forEvent:event nearest:YES];
|
|
|
+ NSPoint pagePoint = point;
|
|
|
|
|
|
NSPoint startPoint = [self.clickLineAnnotation startPoint];
|
|
|
NSPoint *draggedPoint = &pagePoint;
|
|
@@ -406,8 +342,8 @@ static inline CPDFAreaOfInterest CAreaOfInterestForResizeHandle(CRectEdges mask,
|
|
|
[self setNeedsDisplayAnnotation:self.clickLineAnnotation];
|
|
|
}
|
|
|
} else if (self.clickPolylineAnnotation) {
|
|
|
- NSPoint pagePoint = NSZeroPoint;
|
|
|
- CPDFPage *page = [self pageAndPoint:&pagePoint forEvent:event nearest:YES];
|
|
|
+ NSPoint pagePoint = point;
|
|
|
+
|
|
|
if(page == self.clickPolylineAnnotation.page) {
|
|
|
NSMutableArray<NSValue *> *savePoints = [NSMutableArray arrayWithArray:self.clickPolylineAnnotation.savePoints];
|
|
|
|
|
@@ -452,8 +388,8 @@ static inline CPDFAreaOfInterest CAreaOfInterestForResizeHandle(CRectEdges mask,
|
|
|
}
|
|
|
}
|
|
|
} else if (self.clickPolygonAnnotation) {
|
|
|
- NSPoint pagePoint = NSZeroPoint;
|
|
|
- CPDFPage *page = [self pageAndPoint:&pagePoint forEvent:event nearest:YES];
|
|
|
+ NSPoint pagePoint = point;
|
|
|
+
|
|
|
if(page == self.clickPolygonAnnotation.page) {
|
|
|
NSMutableArray<NSValue *> *savePoints = [NSMutableArray arrayWithArray:self.clickPolygonAnnotation.savePoints];
|
|
|
NSUInteger resizeIndex = self.polygonClickNumber;
|
|
@@ -497,8 +433,7 @@ static inline CPDFAreaOfInterest CAreaOfInterestForResizeHandle(CRectEdges mask,
|
|
|
}
|
|
|
}
|
|
|
} else if (self.clickSquareFronPolygonAnnotation) {
|
|
|
- NSPoint pagePoint = NSZeroPoint;
|
|
|
- CPDFPage *page = [self pageAndPoint:&pagePoint forEvent:event nearest:YES];
|
|
|
+ NSPoint pagePoint = point;
|
|
|
|
|
|
if (page == self.clickSquareFronPolygonAnnotation.page) {
|
|
|
CRectEdges resizeHandle = CMaxXEdgeMask | CMinYEdgeMask;
|
|
@@ -509,84 +444,170 @@ static inline CPDFAreaOfInterest CAreaOfInterestForResizeHandle(CRectEdges mask,
|
|
|
[self.pdfListViewDelegate PDFListViewAnnotationMeasureInfoChange:self withAnnotation:self.clickSquareFronPolygonAnnotation];
|
|
|
}
|
|
|
}
|
|
|
- } else if([self isSupportSelectAnnotation] && (newActiveAnnotation && (![self.activeAnnotations containsObject:newActiveAnnotation] || [newActiveAnnotation isKindOfClass:[CPDFRedactAnnotation class]]))) {
|
|
|
- self.hoverAnnotation = newActiveAnnotation;
|
|
|
- [self setNeedsDisplayAnnotationViewForPage:page];
|
|
|
- } else if (!newActiveAnnotation && self.hoverAnnotation) {
|
|
|
- self.hoverAnnotation = nil;
|
|
|
- [self setNeedsDisplayAnnotationViewForPage:page];
|
|
|
- }
|
|
|
-
|
|
|
- // [super mouseMoved:event];
|
|
|
- [self.window mouseMoved:event];
|
|
|
-
|
|
|
- if(!self.isEditing) {
|
|
|
- [self removeShapeLayer];
|
|
|
+ } else {
|
|
|
+ id annotations = [page annotations];
|
|
|
+
|
|
|
+ CPDFAnnotation *newActiveAnnotation = nil;
|
|
|
+ for (CPDFAnnotation *annotation in annotations) {
|
|
|
+ if ([annotation hitTest:point] && [annotation annotationShouldDisplay]) {
|
|
|
+ newActiveAnnotation = annotation;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ CPDFAnnotation *clickNewActiveAnnotation = newActiveAnnotation;
|
|
|
+ NSLog(@"%@",newActiveAnnotation.type);
|
|
|
+
|
|
|
+ [CPDFListView cancelPreviousPerformRequestsWithTarget:self selector:@selector(showHUDHint:) object:self.hoverAnnotation];
|
|
|
+ if(newActiveAnnotation != nil) {
|
|
|
+ if([newActiveAnnotation isKindOfClass:[CPDFLinkAnnotation class]]) {
|
|
|
+ if(self.popOver == nil && (CTextToolMode == self.toolMode ||
|
|
|
+ CMoveToolMode == self.toolMode ||
|
|
|
+ CEditPDFToolLink == self.toolMode)) {
|
|
|
+ CPDFLinkAnnotation *linkNewAnnotation = (CPDFLinkAnnotation *)newActiveAnnotation;
|
|
|
+ if(linkNewAnnotation.destination != nil) {
|
|
|
+ [[KMImageToolTipWindow shared] showForImageContext:linkNewAnnotation at:NSZeroPoint];
|
|
|
+
|
|
|
+ [self hidenHUDHint];
|
|
|
+ } else if(linkNewAnnotation.URL.length > 0){
|
|
|
+ [self performSelector:@selector(showHUDHint:) withObject:newActiveAnnotation afterDelay:0.f];
|
|
|
+
|
|
|
+ if ([KMImageToolTipWindow shared].isVisible == YES) {
|
|
|
+ [[KMImageToolTipWindow shared] fadeOut];
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if(!(CTextToolMode == self.toolMode || CEditPDFToolLink == self.toolMode || CMoveToolMode == self.toolMode)) {
|
|
|
+ clickNewActiveAnnotation = nil;
|
|
|
+ }
|
|
|
+ } else if([newActiveAnnotation isKindOfClass:[CPDFRedactAnnotation class]]) {
|
|
|
+ if ([KMImageToolTipWindow shared].isVisible == YES) {
|
|
|
+ [[KMImageToolTipWindow shared] fadeOut];
|
|
|
+ }
|
|
|
+ [self hidenHUDHint];
|
|
|
+ } else if ([newActiveAnnotation isKindOfClass:[CPDFMarkupAnnotation class]]) {
|
|
|
+ if ([KMImageToolTipWindow shared].isVisible == YES) {
|
|
|
+ [[KMImageToolTipWindow shared] fadeOut];
|
|
|
+ }
|
|
|
+ [self hidenHUDHint];
|
|
|
+ if(!(CTextToolMode == self.toolMode || (CNoteToolMode == self.toolMode && [CPDFListView isMarkupAnnotationType:self.annotationType]))) {
|
|
|
+ clickNewActiveAnnotation = nil;
|
|
|
+ }
|
|
|
+ } else if ([newActiveAnnotation isKindOfClass:[CPDFWidgetAnnotation class]]) {
|
|
|
+ if ([KMImageToolTipWindow shared].isVisible == YES) {
|
|
|
+ [[KMImageToolTipWindow shared] fadeOut];
|
|
|
+ }
|
|
|
+ [self hidenHUDHint];
|
|
|
+
|
|
|
+ if(!(CFormToolMode == self.toolMode ||
|
|
|
+ CTextToolMode == self.toolMode ||
|
|
|
+ CMoveToolMode== self.toolMode)) {
|
|
|
+ clickNewActiveAnnotation = nil;
|
|
|
+ }
|
|
|
+ } else if ([newActiveAnnotation isKindOfClass:[CPDFMovieAnnotation class]] ||
|
|
|
+ [newActiveAnnotation isKindOfClass:[CPDFSoundAnnotation class]]) {
|
|
|
+ if ([KMImageToolTipWindow shared].isVisible == YES) {
|
|
|
+ [[KMImageToolTipWindow shared] fadeOut];
|
|
|
+ }
|
|
|
+ [self hidenHUDHint];
|
|
|
+
|
|
|
+ if(!(CTextToolMode == self.toolMode || (CNoteToolMode == self.toolMode && ![CPDFListView isMarkupAnnotationType:self.annotationType]))) {
|
|
|
+ clickNewActiveAnnotation = nil;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if ([KMImageToolTipWindow shared].isVisible == YES) {
|
|
|
+ [[KMImageToolTipWindow shared] fadeOut];
|
|
|
+ }
|
|
|
+ if(self.popOver == nil &&
|
|
|
+ [newActiveAnnotation isKindOfClass:[CPDFTextAnnotation class]] &&
|
|
|
+ (CTextToolMode == self.toolMode || CNoteToolMode == self.toolMode) &&
|
|
|
+ (newActiveAnnotation.toolTipsString.length > 0)) {
|
|
|
+ [self performSelector:@selector(showHUDHint:) withObject:newActiveAnnotation afterDelay:0.3];
|
|
|
+ } else {
|
|
|
+ [self hidenHUDHint];
|
|
|
+ }
|
|
|
+
|
|
|
+ if(!(CTextToolMode == self.toolMode || (CNoteToolMode == self.toolMode && ![CPDFListView isMarkupAnnotationType:self.annotationType]))) {
|
|
|
+ clickNewActiveAnnotation = nil;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ } else {
|
|
|
+ if ([KMImageToolTipWindow shared].isVisible == YES) {
|
|
|
+ [[KMImageToolTipWindow shared] fadeOut];
|
|
|
+ }
|
|
|
+
|
|
|
+ [self hidenHUDHint];
|
|
|
+ }
|
|
|
|
|
|
+ if (clickNewActiveAnnotation && [clickNewActiveAnnotation isKindOfClass:[CPDFRedactAnnotation class]] && (self.hoverAnnotation == newActiveAnnotation)) {
|
|
|
+ [(CPDFRedactAnnotation *)clickNewActiveAnnotation setDrawRedactionsAsRedacted:YES];
|
|
|
+ [self setNeedsDisplayAnnotationViewForPage:page];
|
|
|
+ } else if(self.hoverAnnotation && [self.hoverAnnotation isKindOfClass:[CPDFRedactAnnotation class]]){
|
|
|
+ [(CPDFRedactAnnotation *)self.hoverAnnotation setDrawRedactionsAsRedacted:NO];
|
|
|
+ [self setNeedsDisplayAnnotationViewForPage:page];
|
|
|
+ }
|
|
|
+
|
|
|
+ NSLog(@"-----%@",clickNewActiveAnnotation.type);
|
|
|
+ //显示虚线
|
|
|
+ if((clickNewActiveAnnotation &&
|
|
|
+ (![self.activeAnnotations containsObject:clickNewActiveAnnotation] || [clickNewActiveAnnotation isKindOfClass:[CPDFRedactAnnotation class]]))) {
|
|
|
+ self.hoverAnnotation = newActiveAnnotation;
|
|
|
+ [self setNeedsDisplayAnnotationViewForPage:page];
|
|
|
+ } else if (!clickNewActiveAnnotation && self.hoverAnnotation) {
|
|
|
+ self.hoverAnnotation = nil;
|
|
|
+ [self setNeedsDisplayAnnotationViewForPage:page];
|
|
|
+ }
|
|
|
+
|
|
|
+ //设置鼠标样式
|
|
|
BOOL isIncludeText = NO;
|
|
|
NSMutableArray *currentActiveAnnotations = [NSMutableArray array];
|
|
|
for (CPDFAnnotation *an in self.activeAnnotations) {
|
|
|
if([an.page isEqual:page]) {
|
|
|
if([an isKindOfClass:[CPDFFreeTextAnnotation class]])
|
|
|
isIncludeText = YES;
|
|
|
- if(!([an isKindOfClass:[CPDFMarkupAnnotation class]] || [an isKindOfClass:[CPDFTextAnnotation class]])) {
|
|
|
+ if(!([an isKindOfClass:[CPDFMarkupAnnotation class]] ||
|
|
|
+ [an isKindOfClass:[CPDFTextAnnotation class]])) {
|
|
|
[currentActiveAnnotations addObject:an];
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- if(CNoteToolMode == self.toolMode ||
|
|
|
- CTextToolMode == self.toolMode ||
|
|
|
- CFormToolMode == self.toolMode ||
|
|
|
- CRedactToolMode == self.toolMode ||
|
|
|
- CRedactErasureToolMode == self.toolMode) {
|
|
|
- if(currentActiveAnnotations.count > 1) {
|
|
|
- NSRect rect = [self selectionMultipleBoundsWithAnnotations:currentActiveAnnotations];
|
|
|
- CRectEdges resizeHandle = CPDFListViewResizeHandleForPointFromRect(point, rect, 4.0 / [self scaleFactor]);
|
|
|
-
|
|
|
- [self setCursorForAreaOfInterest:CAreaOfInterestForResizeHandle(resizeHandle, page)];
|
|
|
- } else {
|
|
|
- if([self.activeAnnotation page] == page &&
|
|
|
- [self.activeAnnotation isResizable] &&
|
|
|
- [self.activeAnnotation resizeHandleForPoint:point scaleFactor:[self scaleFactor]] != 0) {
|
|
|
- CRectEdges resizeHandle = [self.activeAnnotation resizeHandleForPoint:point scaleFactor:[self scaleFactor]];
|
|
|
- [self setCursorForAreaOfInterest:CAreaOfInterestForResizeHandle(resizeHandle, page)];
|
|
|
- } else {
|
|
|
- CPDFAreaOfInterest area = [self areaOfInterestForMouse:event];
|
|
|
- if(newActiveAnnotation && (self.annotationType != CAnnotationTypeSignSignature && self.annotationType != CAnnotationTypeStamp)) {
|
|
|
- area = CDragArea;
|
|
|
- }
|
|
|
-
|
|
|
- if (point.x < 0 || point.x > page.bounds.size.width) {
|
|
|
+ NSRect rect = [self selectionMultipleBoundsWithAnnotations:currentActiveAnnotations];
|
|
|
+ CRectEdges resizeHandle = CPDFListViewResizeHandleForPointFromRect(point, rect, 4.0 / [self scaleFactor]);
|
|
|
+ if(currentActiveAnnotations.count > 1 && resizeHandle != 0) {
|
|
|
+ [self setCursorForAreaOfInterest:CAreaOfInterestForResizeHandle(resizeHandle, page)];
|
|
|
+ } else if([self.activeAnnotation page] == page &&
|
|
|
+ [self.activeAnnotation isResizable] &&
|
|
|
+ [self.activeAnnotation resizeHandleForPoint:point scaleFactor:[self scaleFactor]] != 0){
|
|
|
+ CRectEdges resizeHandle = [self.activeAnnotation resizeHandleForPoint:point scaleFactor:[self scaleFactor]];
|
|
|
+ [self setCursorForAreaOfInterest:CAreaOfInterestForResizeHandle(resizeHandle, page)];
|
|
|
+ } else {
|
|
|
+ if(clickNewActiveAnnotation){
|
|
|
+ if ([clickNewActiveAnnotation isKindOfClass:[CPDFLinkAnnotation class]] ||
|
|
|
+ [clickNewActiveAnnotation isKindOfClass:[CPDFButtonWidgetAnnotation class]] ||
|
|
|
+ [clickNewActiveAnnotation isKindOfClass:[CPDFChoiceWidgetAnnotation class]] ||
|
|
|
+ [clickNewActiveAnnotation isKindOfClass:[CPDFSignatureAnnotation class]]) {
|
|
|
+ if(self.toolMode == CTextToolMode || self.toolMode == CMoveToolMode) {
|
|
|
+ [[NSCursor pointingHandCursor] set];
|
|
|
+ } else {
|
|
|
[[NSCursor arrowCursor] set];
|
|
|
- } else if (point.y < 0 || point.y > page.bounds.size.height) {
|
|
|
-
|
|
|
+ }
|
|
|
+ } else if ([clickNewActiveAnnotation isKindOfClass:[CPDFFreeTextAnnotation class]] ||
|
|
|
+ [clickNewActiveAnnotation isKindOfClass:[CPDFTextWidgetAnnotation class]]) {
|
|
|
+ if(self.toolMode == CTextToolMode || self.toolMode == CMoveToolMode) {
|
|
|
+ [[NSCursor IBeamCursor] set];
|
|
|
} else {
|
|
|
- [self setCursorForAreaOfInterest:area];
|
|
|
+ [[NSCursor arrowCursor] set];
|
|
|
}
|
|
|
}
|
|
|
+ } else {
|
|
|
+ [self setCursorForMouse:event];
|
|
|
}
|
|
|
-
|
|
|
- if ((CFormToolMode == self.toolMode &&
|
|
|
- (self.annotationType >= CAnnotationTypeRadioButton &&
|
|
|
- self.annotationType <= CAnnotationTypeSignature)) || (CNoteToolMode == self.toolMode && self.stampObject)){
|
|
|
- CPDFAnnotationModel *annotationModel = [[CPDFAnnotationModel alloc] initWithAnnotationType:self.annotationType];
|
|
|
- CGFloat defaultWidth = annotationModel.noteWidth;
|
|
|
- CGFloat defaultHeight = annotationModel.noteHeight;
|
|
|
- NSSize defaultSize = ([page rotation] % 180 == 0) ? NSMakeSize(defaultWidth, defaultHeight) : NSMakeSize(defaultHeight, defaultWidth);
|
|
|
- CGRect bounds = CPDFListViewRectFromRightAndSize(point, defaultSize);
|
|
|
- CRectEdges resizeHandle = CMinXEdgeMask | CMaxYEdgeMask;
|
|
|
-
|
|
|
- // [self.dragHoverPoints addObjectsFromArray:[self dragHoverPointsForRect:bounds forPage:page resizeHandle:resizeHandle]];
|
|
|
- [self dragAnnotationReferenceLine:self.activeAnnotation];
|
|
|
- self.dragHoverPage = page;
|
|
|
- }
|
|
|
-
|
|
|
- [self setNeedsDisplayAnnotationViewForVisiblePages];
|
|
|
- } else {
|
|
|
- [self setCursorForMouse:event];
|
|
|
}
|
|
|
}
|
|
|
+ [self.window mouseMoved:event];
|
|
|
}
|
|
|
|
|
|
- (void)mouseExited:(NSEvent *)event {
|
|
@@ -4556,10 +4577,6 @@ static inline CPDFAreaOfInterest CAreaOfInterestForResizeHandle(CRectEdges mask,
|
|
|
newActiveAnnotation = nil;
|
|
|
}
|
|
|
|
|
|
-// if (([newActiveAnnotation isForm]) && self.toolMode != CFormToolMode) {
|
|
|
-// newActiveAnnotation = nil;
|
|
|
-// }
|
|
|
-
|
|
|
if([newActiveAnnotation isKindOfClass:[CPDFInkAnnotation class]]) {
|
|
|
if(self.annotationType == CAnnotationTypeInk || self.annotationType == CAnnotationTypeEraser)
|
|
|
newActiveAnnotation = nil;
|