]> source.dussan.org Git - vaadin-framework.git/commitdiff
fixing iLayout function when Panel is not the first object in container
authorMatti Tahvonen <matti.tahvonen@itmill.com>
Thu, 22 Nov 2007 10:48:03 +0000 (10:48 +0000)
committerMatti Tahvonen <matti.tahvonen@itmill.com>
Thu, 22 Nov 2007 10:48:03 +0000 (10:48 +0000)
svn changeset:2888/svn branch:trunk

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

index 2dc03d568ca259474d4ba5a37f732a49ce827cce..84a34992a4c2c0775fc2ed1083d8b2c660c8970b 100644 (file)
@@ -51,11 +51,12 @@ public class IPanel extends SimplePanel implements Paintable,
 
     public void updateFromUIDL(UIDL uidl, ApplicationConnection client) {
         // Ensure correct implementation
-        if (client.updateComponent(this, uidl, false))
+        if (client.updateComponent(this, uidl, false)) {
             return;
+        }
 
         this.client = client;
-        this.id = uidl.getId();
+        id = uidl.getId();
 
         // Panel size. Height needs to be saved for later use
         String w = uidl.hasVariable("width") ? uidl.getStringVariable("width")
@@ -149,7 +150,8 @@ public class IPanel extends SimplePanel implements Paintable,
             int usedHeight = DOM.getElementPropertyInt(bottomDecoration,
                     "offsetTop")
                     + DOM.getElementPropertyInt(bottomDecoration,
-                            "offsetHeight");
+                            "offsetHeight")
+                    - DOM.getElementPropertyInt(getElement(), "offsetTop");
 
             // Calculate content area height (don't allow negative values)
             int h = targetHeight - usedHeight;