Revision: 14343
http://sourceforge.net/p/skim-app/code/14343
Author: hofman
Date: 2024-06-25 17:04:04 +0000 (Tue, 25 Jun 2024)
Log Message:
-----------
Put new anchored note with selection in text margin rather than next to
selection
Modified Paths:
--------------
trunk/SKPDFView.m
Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m 2024-06-17 08:56:44 UTC (rev 14342)
+++ trunk/SKPDFView.m 2024-06-25 17:04:04 UTC (rev 14343)
@@ -2705,20 +2705,25 @@
}
bounds = SKRectFromPoints(p1, p2);
} else if (annotationType == SKAnchoredNote) {
+ NSRect pageBounds = [page boundsForBox:[self displayBox]];
switch ([page intrinsicRotation]) {
case 0:
+ bounds = [[page
selectionForRect:NSMakeRect(NSMinX(pageBounds), NSMinY(bounds),
NSWidth(pageBounds), NSHeight(bounds))] boundsForPage:page];
bounds.origin.x = floor(NSMinX(bounds)) -
SKNPDFAnnotationNoteSize.width;
bounds.origin.y = floor(NSMaxY(bounds)) -
SKNPDFAnnotationNoteSize.height;
break;
case 90:
+ bounds = [[page
selectionForRect:NSMakeRect(NSMinX(bounds), NSMinY(pageBounds),
NSWidth(bounds), NSWidth(pageBounds))] boundsForPage:page];
bounds.origin.x = ceil(NSMinX(bounds));
bounds.origin.y = floor(NSMinY(bounds)) -
SKNPDFAnnotationNoteSize.height;
break;
case 180:
+ bounds = [[page
selectionForRect:NSMakeRect(NSMinX(pageBounds), NSMinY(bounds),
NSWidth(pageBounds), NSHeight(bounds))] boundsForPage:page];
bounds.origin.x = ceil(NSMaxX(bounds));
bounds.origin.y = ceil(NSMinY(bounds));
break;
case 270:
+ bounds = [[page
selectionForRect:NSMakeRect(NSMinX(bounds), NSMinY(pageBounds),
NSWidth(bounds), NSWidth(pageBounds))] boundsForPage:page];
bounds.origin.x = floor(NSMaxX(bounds)) -
SKNPDFAnnotationNoteSize.height;
bounds.origin.y = ceil(NSMaxY(bounds));
break;
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit