Revision: 3137
          http://skim-app.svn.sourceforge.net/skim-app/?rev=3137&view=rev
Author:   hofman
Date:     2007-11-02 16:56:53 -0700 (Fri, 02 Nov 2007)

Log Message:
-----------
Correct restriction of resizes annotation in page.

Modified Paths:
--------------
    trunk/SKPDFView.m

Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m   2007-11-02 21:20:26 UTC (rev 3136)
+++ trunk/SKPDFView.m   2007-11-02 23:56:53 UTC (rev 3137)
@@ -2939,8 +2939,9 @@
             } else if (dragMask & BDSKMinXEdgeMask) {
                 newBounds.origin.x += relPoint.x;
                 newBounds.size.width -= relPoint.x;
-                if (NSMaxX(newBounds) > NSMaxX(pageBounds)) {
-                    newBounds.size.width = NSMaxX(pageBounds) - 
NSMinX(newBounds);
+                if (NSMinX(newBounds) < NSMinX(pageBounds)) {
+                    newBounds.size.width = NSMaxX(newBounds) - 
NSMinX(pageBounds);
+                    newBounds.origin.x = NSMinX(pageBounds);
                 }
                 if (NSWidth(newBounds) < 8.0) {
                     newBounds.origin.x = NSMaxX(newBounds) - 8.0;
@@ -2958,8 +2959,9 @@
             } else if (dragMask & BDSKMinYEdgeMask) {
                 newBounds.origin.y += relPoint.y;
                 newBounds.size.height -= relPoint.y;
-                if (NSMaxY(newBounds) > NSMaxY(pageBounds)) {
-                    newBounds.size.height = NSMaxY(pageBounds) - 
NSMinY(newBounds);
+                if (NSMinY(newBounds) < NSMinY(pageBounds)) {
+                    newBounds.size.height = NSMaxY(newBounds) - 
NSMinY(pageBounds);
+                    newBounds.origin.y = NSMinY(pageBounds);
                 }
                 if (NSHeight(newBounds) < 8.0) {
                     newBounds.origin.y = NSMaxY(newBounds) - 8.0;


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to