From 41e1a013d829f75c0bdadea40ec0b42429e2a581 Mon Sep 17 00:00:00 2001 From: John Ahlroos Date: Thu, 14 Feb 2013 15:41:45 +0200 Subject: Interim fix for resizing of child component in AbsoluteLayout when child is 100% and layout resized (no-merge) #10427 Change-Id: I497ecc1ac88ef1b3c07d127aff3c157827088e01 --- client/src/com/vaadin/client/ui/VAbsoluteLayout.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'client') diff --git a/client/src/com/vaadin/client/ui/VAbsoluteLayout.java b/client/src/com/vaadin/client/ui/VAbsoluteLayout.java index 92a51f209d..88fbae6e88 100644 --- a/client/src/com/vaadin/client/ui/VAbsoluteLayout.java +++ b/client/src/com/vaadin/client/ui/VAbsoluteLayout.java @@ -326,6 +326,10 @@ public class VAbsoluteLayout extends ComplexPanel { Style wrapperStyle = wrapper.getElement().getStyle(); Style widgetStyle = wrapper.getWidget().getElement().getStyle(); + + // Ensure previous heights do not affect the measures + wrapperStyle.clearHeight(); + if (widgetStyle.getHeight() != null && widgetStyle.getHeight().endsWith("%")) { int h; @@ -343,8 +347,6 @@ public class VAbsoluteLayout extends ComplexPanel { - wrapper.getElement().getOffsetTop(); } wrapperStyle.setHeight(h, Unit.PX); - } else { - wrapperStyle.clearHeight(); } wrapper.updateCaptionPosition(); @@ -380,6 +382,9 @@ public class VAbsoluteLayout extends ComplexPanel { Style wrapperStyle = wrapper.getElement().getStyle(); Style widgetStyle = wrapper.getWidget().getElement().getStyle(); + // Ensure previous heights do not affect the measures + wrapperStyle.clearWidth(); + if (widgetStyle.getWidth() != null && widgetStyle.getWidth().endsWith("%")) { int w; @@ -398,8 +403,6 @@ public class VAbsoluteLayout extends ComplexPanel { - wrapper.getElement().getOffsetLeft(); } wrapperStyle.setWidth(w, Unit.PX); - } else { - wrapperStyle.clearWidth(); } wrapper.updateCaptionPosition(); -- cgit v1.2.3