diff options
author | John Ahlroos <john@vaadin.com> | 2012-09-13 11:57:49 +0300 |
---|---|---|
committer | John Ahlroos <john@vaadin.com> | 2012-09-13 11:58:00 +0300 |
commit | 3bece94faa5ba2ea4e1d2b3f60da220dfd6d82df (patch) | |
tree | bed0efe1151cdf6e21d82b9d78ae658e36889ae4 /client | |
parent | 47638e7f5c3e320958dbbe2ae7e7ef001a784420 (diff) | |
download | vaadin-framework-3bece94faa5ba2ea4e1d2b3f60da220dfd6d82df.tar.gz vaadin-framework-3bece94faa5ba2ea4e1d2b3f60da220dfd6d82df.zip |
Fixed issues found in review #9596
Diffstat (limited to 'client')
-rw-r--r-- | client/src/com/vaadin/client/ui/orderedlayout/AbstractOrderedLayoutConnector.java | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/client/src/com/vaadin/client/ui/orderedlayout/AbstractOrderedLayoutConnector.java b/client/src/com/vaadin/client/ui/orderedlayout/AbstractOrderedLayoutConnector.java index 8fb7b6d936..d65a2aeb9b 100644 --- a/client/src/com/vaadin/client/ui/orderedlayout/AbstractOrderedLayoutConnector.java +++ b/client/src/com/vaadin/client/ui/orderedlayout/AbstractOrderedLayoutConnector.java @@ -409,6 +409,7 @@ public abstract class AbstractOrderedLayoutConnector extends .isEmpty(); boolean allChildrenHasVerticalAlignmentCenterOrBottom = hasVerticalAlignment .size() == getChildren().size(); + boolean hasChildrenWithRelativeHeight = !hasRelativeHeight.isEmpty(); if(isVertical){ return false; @@ -418,6 +419,10 @@ public abstract class AbstractOrderedLayoutConnector extends return false; } + else if (!hasChildrenWithRelativeHeight) { + return false; + } + else if (!hasChildrenWithVerticalAlignmentCenterOrBottom) { return false; } @@ -532,14 +537,13 @@ public abstract class AbstractOrderedLayoutConnector extends Element el = child.getWidget().getElement(); CaptionPosition pos = getWidget().getCaptionPositionFromElement( (Element) el.getParentElement().cast()); + int h = getLayoutManager().getOuterHeight(el); + if (h == -1) { + // Height has not yet been measured so using a more + // conventional method instead. + h = Util.getRequiredHeight(el); + } if (needsMeasure.contains(el)) { - int h = getLayoutManager().getOuterHeight(el); - if (h == -1) { - // Height has not yet been measured so using a more - // conventional method instead. - h = Util.getRequiredHeight(el); - } - String sHeight = el.getStyle().getHeight(); // Only add the caption size to the height of the slot if // coption position is top or bottom @@ -552,13 +556,6 @@ public abstract class AbstractOrderedLayoutConnector extends highestNonRelative = h; } } else { - int h = getLayoutManager().getOuterHeight(el); - if (h == -1) { - // Height has not yet been measured so using a more - // conventional method instead. - h = Util.getRequiredHeight(el); - } - if (childCaptionElementHeight.containsKey(el) && (pos == CaptionPosition.TOP || pos == CaptionPosition.BOTTOM)) { h += childCaptionElementHeight.get(el); |