diff options
author | caalador <mikael.grankvist@gmail.com> | 2017-01-23 17:11:47 +0200 |
---|---|---|
committer | Denis <denis@vaadin.com> | 2017-01-23 17:11:47 +0200 |
commit | ee7782f256a9b79f9cc13a659dd2bea930dd0e72 (patch) | |
tree | 4f1fbf48b01bd0fe1cfe56b3dc794ac4495c4393 /client | |
parent | 3a3e482606db2ae250e3fb4a02695dbacd0aed10 (diff) | |
download | vaadin-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.java | 4 |
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); + } } }; |