]> source.dussan.org Git - vaadin-framework.git/commitdiff
made body container fixed height
authorMatti Tahvonen <matti.tahvonen@itmill.com>
Wed, 27 Jun 2007 05:36:12 +0000 (05:36 +0000)
committerMatti Tahvonen <matti.tahvonen@itmill.com>
Wed, 27 Jun 2007 05:36:12 +0000 (05:36 +0000)
svn changeset:1791/svn branch:trunk

src/com/itmill/toolkit/terminal/gwt/client/ui/scrolltable/IScrollTableBody.java

index 7b2b54b4983f6552ea8de6716ec043fb140c1666..2db29313076069bd3eefcabdc5fb8d96ad5fb656 100644 (file)
@@ -1,4 +1,4 @@
-package com.itmill.toolkit.terminal.gwt.client.ui.scrolltable;
+       package com.itmill.toolkit.terminal.gwt.client.ui.scrolltable;
 
 import java.util.Iterator;
 import java.util.List;
@@ -183,13 +183,14 @@ public class IScrollTableBody extends Panel {
        protected void onAttach() {
                super.onAttach();
                fixSpacers();
+               // fix container blocks height to avoid "bouncing" when scrolling
+               DOM.setStyleAttribute(container, "height", totalRows*getRowHeight() + "px");
        }
        
        private void fixSpacers() {
                int tBodyHeight = DOM.getIntAttribute(table, "offsetHeight");
                DOM.setStyleAttribute(preSpacer, "height", getRowHeight()*firstRendered + "px");
                DOM.setStyleAttribute(postSpacer, "height", getRowHeight()*(totalRows - 1  - lastRendered) + "px");
-               
        }
 
        public int getTotalRows() {