]> source.dussan.org Git - vaadin-framework.git/commitdiff
Index indicator (while scrolling) now takes actual table height into account, not...
authorMarc Englund <marc.englund@itmill.com>
Tue, 1 Jul 2008 08:51:01 +0000 (08:51 +0000)
committerMarc Englund <marc.englund@itmill.com>
Tue, 1 Jul 2008 08:51:01 +0000 (08:51 +0000)
svn changeset:4992/svn branch:trunk

src/com/itmill/toolkit/terminal/gwt/client/ui/IScrollTable.java

index b668fd0fa607c706713071bb184aa50a66139bac..231e4e6de178280953edb03d190de3a5e57647f1 100644 (file)
@@ -765,12 +765,15 @@ public class IScrollTable extends Composite implements Table, ScrollListener,
                 .getElementPropertyInt(getElement(), "offsetHeight") - 2)
                 + "px");
 
-        int last = (firstRowInViewPort + pageLength);
+        // indexes go from 1-totalRows, as rowheaders in index-mode indicate
+        int last = (firstRowInViewPort + (bodyContainer.getOffsetHeight() / tBody
+                .getRowHeight()));
         if (last > totalRows) {
             last = totalRows;
         }
-        DOM.setInnerHTML(scrollPositionElement, "<span>" + firstRowInViewPort
-                + " &ndash; " + last + "..." + "</span>");
+        DOM.setInnerHTML(scrollPositionElement, "<span>"
+                + (firstRowInViewPort + 1) + " &ndash; " + last + "..."
+                + "</span>");
         DOM.setStyleAttribute(scrollPositionElement, "display", "block");
     }