Mercurial > dive4elements > river
comparison flys-client/src/main/java/de/intevation/flys/client/client/ui/map/MapOutputTab.java @ 4531:4c2c1d4cf777
Map is now properly resized when hiding ThemePanel.
author | Christian Lins <christian.lins@intevation.de> |
---|---|
date | Thu, 15 Nov 2012 14:19:52 +0100 |
parents | 099d136b215b |
children | 8ca06d3040d0 |
comparison
equal
deleted
inserted
replaced
4525:f8ed8114f415 | 4531:4c2c1d4cf777 |
---|---|
179 | 179 |
180 // Calculate bounds of Map | 180 // Calculate bounds of Map |
181 int height = rootLayout.getHeight() - | 181 int height = rootLayout.getHeight() - |
182 controlPanel.getHeight() - 6; | 182 controlPanel.getHeight() - 6; |
183 int width = controlPanel.getWidth() - | 183 int width = controlPanel.getWidth() - |
184 (themePanelCanvas.isVisible() ? themePanelCanvas.getWidth() + 4 : 0); | 184 (themePanelCanvas.isVisible() ? themePanelCanvas.getWidth() + 4 : 2); |
185 | 185 |
186 // Set size and position of Map | 186 // Set size and position of Map |
187 String w = String.valueOf(width) + "px"; | 187 String w = String.valueOf(width) + "px"; |
188 String h = String.valueOf(height) + "px"; | 188 String h = String.valueOf(height) + "px"; |
189 GWT.log("width=" + w); | 189 GWT.log("width=" + w); |
190 | 190 |
191 mapPanel.setSize(w, h); | 191 mapPanel.setSize(w, h); |
192 mapPanel.getMap().updateSize(); | |
192 if(themePanelCanvas.isVisible()) { | 193 if(themePanelCanvas.isVisible()) { |
193 absPan.setWidgetPosition(mapPanel, themePanelCanvas.getWidth() + 2, 0); | 194 absPan.setWidgetPosition(mapPanel, themePanelCanvas.getWidth() + 2, 0); |
194 } | 195 } |
195 else { | 196 else { |
196 absPan.setWidgetPosition(mapPanel, 0, 0); | 197 absPan.setWidgetPosition(mapPanel, 0, 0); |