From: Marc Englund Date: Tue, 1 Jul 2008 08:51:01 +0000 (+0000) Subject: Index indicator (while scrolling) now takes actual table height into account, not... X-Git-Tag: 6.7.0.beta1~4528 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=3d78fde0c5fd620b2023517add6680c85674d0a9;p=vaadin-framework.git Index indicator (while scrolling) now takes actual table height into account, not just pagelength; fixes #1848 svn changeset:4992/svn branch:trunk --- diff --git a/src/com/itmill/toolkit/terminal/gwt/client/ui/IScrollTable.java b/src/com/itmill/toolkit/terminal/gwt/client/ui/IScrollTable.java index b668fd0fa6..231e4e6de1 100644 --- a/src/com/itmill/toolkit/terminal/gwt/client/ui/IScrollTable.java +++ b/src/com/itmill/toolkit/terminal/gwt/client/ui/IScrollTable.java @@ -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, "" + firstRowInViewPort - + " – " + last + "..." + ""); + DOM.setInnerHTML(scrollPositionElement, "" + + (firstRowInViewPort + 1) + " – " + last + "..." + + ""); DOM.setStyleAttribute(scrollPositionElement, "display", "block"); }