changeset 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 f8ed8114f415
children 5a2dba5be941
files flys-client/src/main/java/de/intevation/flys/client/client/ui/map/MapOutputTab.java
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/map/MapOutputTab.java	Wed Nov 14 23:48:49 2012 +0100
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/map/MapOutputTab.java	Thu Nov 15 14:19:52 2012 +0100
@@ -181,7 +181,7 @@
         int height = rootLayout.getHeight() -
                 controlPanel.getHeight() - 6;
         int width  = controlPanel.getWidth() -
-                (themePanelCanvas.isVisible() ? themePanelCanvas.getWidth() + 4 : 0);
+                (themePanelCanvas.isVisible() ? themePanelCanvas.getWidth() + 4 : 2);
 
         // Set size and position of Map
         String w = String.valueOf(width) + "px";
@@ -189,6 +189,7 @@
         GWT.log("width=" + w);
 
         mapPanel.setSize(w, h);
+        mapPanel.getMap().updateSize();
         if(themePanelCanvas.isVisible()) {
             absPan.setWidgetPosition(mapPanel, themePanelCanvas.getWidth() + 2, 0);
         }

http://dive4elements.wald.intevation.org