Fix off-by-one error
authorMichael M Slusarz <slusarz@curecanti.org>
Mon, 3 Aug 2009 17:35:37 +0000 (11:35 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Mon, 3 Aug 2009 17:57:07 +0000 (11:57 -0600)
imp/js/ViewPort.js

index 9efa247..28a6e69 100644 (file)
@@ -224,7 +224,7 @@ var ViewPort = Class.create({
             break;
 
         case 1:
-            s.moveScroll(Math.min(rownum, this.getMetaData('total_rows') - this.getPageSize() + 1));
+            s.moveScroll(Math.min(rownum - 1, this.getMetaData('total_rows') - this.getPageSize()));
             break;
         }