summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorcaalador <mikael.grankvist@gmail.com>2017-01-23 17:11:47 +0200
committerDenis <denis@vaadin.com>2017-01-23 17:11:47 +0200
commitee7782f256a9b79f9cc13a659dd2bea930dd0e72 (patch)
tree4f1fbf48b01bd0fe1cfe56b3dc794ac4495c4393 /client
parent3a3e482606db2ae250e3fb4a02695dbacd0aed10 (diff)
downloadvaadin-framework-ee7782f256a9b79f9cc13a659dd2bea930dd0e72.tar.gz
vaadin-framework-ee7782f256a9b79f9cc13a659dd2bea930dd0e72.zip
Fix absolute layout component sizing on size change (#8269)
* Fix absolute layout component sizing on size change (#8255, #8256, #8257) Changing from relative to defined size leaves the component positioned wrong, also changing from defined size to relative size leaves the component in the wrong position with the wrong size. Change makes the wrapper rerun setChildWidgetPosition() that adds/removes necessary css definitions to/from the cssPosition String. * Clean test sources according to review.
Diffstat (limited to 'client')
-rw-r--r--client/src/main/java/com/vaadin/client/ui/absolutelayout/AbsoluteLayoutConnector.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/client/src/main/java/com/vaadin/client/ui/absolutelayout/AbsoluteLayoutConnector.java b/client/src/main/java/com/vaadin/client/ui/absolutelayout/AbsoluteLayoutConnector.java
index 0e82397261..857d13c4b5 100644
--- a/client/src/main/java/com/vaadin/client/ui/absolutelayout/AbsoluteLayoutConnector.java
+++ b/client/src/main/java/com/vaadin/client/ui/absolutelayout/AbsoluteLayoutConnector.java
@@ -71,6 +71,10 @@ public class AbsoluteLayoutConnector extends AbstractComponentContainerConnector
getWidget().setWidgetWrapperStyleNames(child.getWidget(),
childStyles.toArray(new String[childStyles.size()]));
}
+
+ if (stateChangeEvent.hasPropertyChanged("height") || stateChangeEvent.hasPropertyChanged("width")) {
+ setChildWidgetPosition(child);
+ }
}
};