Changeset 4992

Show
Ignore:
Timestamp:
07/01/08 08:51:01 (5 months ago)
Author:
marc.englund@…
Message:

Index indicator (while scrolling) now takes actual table height into account, not just pagelength; fixes #1848

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/com/itmill/toolkit/terminal/gwt/client/ui/IScrollTable.java

    r4914 r4992  
    766766                + "px"); 
    767767 
    768         int last = (firstRowInViewPort + pageLength); 
     768        // indexes go from 1-totalRows, as rowheaders in index-mode indicate 
     769        int last = (firstRowInViewPort + (bodyContainer.getOffsetHeight() / tBody 
     770                .getRowHeight())); 
    769771        if (last > totalRows) { 
    770772            last = totalRows; 
    771773        } 
    772         DOM.setInnerHTML(scrollPositionElement, "<span>" + firstRowInViewPort 
    773                 + " &ndash; " + last + "..." + "</span>"); 
     774        DOM.setInnerHTML(scrollPositionElement, "<span>" 
     775                + (firstRowInViewPort + 1) + " &ndash; " + last + "..." 
     776                + "</span>"); 
    774777        DOM.setStyleAttribute(scrollPositionElement, "display", "block"); 
    775778    }