changeset 4541:7b454c6e2bcb

MapPanel position and size now properly aligned (#568).
author Christian Lins <christian.lins@intevation.de>
date Thu, 15 Nov 2012 17:06:09 +0100
parents 5a2dba5be941
children 8e8cabaeab6a
files flys-client/src/main/java/de/intevation/flys/client/client/ui/map/MapPanel.java
diffstat 1 files changed, 8 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/map/MapPanel.java	Thu Nov 15 14:20:55 2012 +0100
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/map/MapPanel.java	Thu Nov 15 17:06:09 2012 +0100
@@ -62,10 +62,15 @@
 
 
     protected void doLayout() {
-        GWT.log("MapPanel.size: " + getWidth() + "x" + getHeight());
+        int width = getWidth();
+        int height = getHeight();
+        GWT.log("MapPanel.size: " + width + "x" + height);
 
-        this.floodMapWidget.setWidth(getWidthAsString());
-        this.floodMapWidget.setHeight(getHeightAsString());
+        width -= 2; // minus black borders
+        height -= toolbar.getHeight() + 4;
+
+        this.floodMapWidget.setWidth(Integer.toString(width));
+        this.floodMapWidget.setHeight(Integer.toString(height));
     }
 
 

http://dive4elements.wald.intevation.org