Fixed bug in setting clip view.

Reviewed by me.
This commit is contained in:
Francisco Tolmasky committed 2009-03-18 23:48:25 -07:00
1 parent 50a5abe321
commit 018fe182d3
1 file changed
+3
+3
View File
@@ -100,6 +100,9 @@
*/
- (CGPoint)constrainScrollPoint:(CGPoint)aPoint
{
if (!_documentView)
return _CGPointMakeZero();
var documentFrame = [_documentView frame];
aPoint.x = MAX(0.0, MIN(aPoint.x, MAX(_CGRectGetWidth(documentFrame) - _CGRectGetWidth(_bounds), 0.0)));