Revision: 16019
http://sourceforge.net/p/skim-app/code/16019
Author: hofman
Date: 2026-01-13 17:36:47 +0000 (Tue, 13 Jan 2026)
Log Message:
-----------
constrain scroll point when dragging
Modified Paths:
--------------
trunk/PDFView_SKExtensions.m
Modified: trunk/PDFView_SKExtensions.m
===================================================================
--- trunk/PDFView_SKExtensions.m 2026-01-13 17:27:59 UTC (rev 16018)
+++ trunk/PDFView_SKExtensions.m 2026-01-13 17:36:47 UTC (rev 16019)
@@ -149,9 +149,11 @@
// convert takes flipping and scaling into account
NSPoint newLocation = [clipView convertPoint:[theEvent
locationInWindow] fromView:nil];
- NSPoint point = SKAddPoints([clipView bounds].origin,
SKSubstractPoints(startLocation, newLocation));
+ NSRect bounds = [clipView bounds];
+ bounds.origin = SKAddPoints(bounds.origin,
SKSubstractPoints(startLocation, newLocation));
+ bounds = [clipView constrainBoundsRect:bounds];
- [clipView scrollToPoint:point];
+ [clipView scrollToPoint:bounds.origin];
[scrollView reflectScrolledClipView:clipView];
}
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