comparison flys-client/src/main/java/de/intevation/flys/client/client/ui/GaugePanel.java @ 4205:0dd8963cec9c

Set also the width of the GaugeTree when resizing the GaugePanel GWT is no longer able to calculate and set the correct width of the GaugeTree since the GaugeTree is added via a Canvas wrapper. Therefore set the width manually when resizing the GaugeTree.
author Björn Ricks <bjoern.ricks@intevation.de>
date Mon, 22 Oct 2012 15:33:16 +0200
parents 9f9843491ac4
children 207de712d79d
comparison
equal deleted inserted replaced
4204:9f9843491ac4 4205:0dd8963cec9c
123 public void onResized(ResizedEvent event) { 123 public void onResized(ResizedEvent event) {
124 /* this height calculation is only an approximation and doesn't reflect 124 /* this height calculation is only an approximation and doesn't reflect
125 * the real height of the the gaugetree. */ 125 * the real height of the the gaugetree. */
126 int height = getInnerContentHeight() - 126 int height = getInnerContentHeight() -
127 RiverInfoPanel.getStaticHeight(); 127 RiverInfoPanel.getStaticHeight();
128 int width = getInnerContentWidth();
128 129
129 if (height < 0) { 130 if (height < 0) {
130 height = 0; 131 height = 0;
131 } 132 }
132 133
133 GWT.log("GaugePanel - onResize " + height); 134 GWT.log("GaugePanel - onResize " + height);
134 135
135 gaugetree.setHeight("" + height + "px"); 136 gaugetree.setHeight("" + height + "px");
137 gaugetree.setWidth("" + width + "px");
136 138
137 for (Canvas canvas : getMembers()) { 139 for (Canvas canvas : getMembers()) {
138 GWT.log("GaugePanel - member height " + canvas.getHeight()); 140 GWT.log("GaugePanel - member height " + canvas.getHeight());
139 } 141 }
140 } 142 }

http://dive4elements.wald.intevation.org