[Dive4elements-commits] [PATCH 1 of 2] MapPanel position and size now properly aligned (#568)
Wald Commits
scm-commit at wald.intevation.org
Thu Nov 15 17:06:57 CET 2012
# HG changeset patch
# User Christian Lins <christian.lins at intevation.de>
# Date 1352995569 -3600
# Node ID 7b454c6e2bcbbd209a16710de92f5b6bcbffe56e
# Parent 5a2dba5be941dd755637dc056f65e7a7e7ade8ba
MapPanel position and size now properly aligned (#568).
diff -r 5a2dba5be941 -r 7b454c6e2bcb flys-client/src/main/java/de/intevation/flys/client/client/ui/map/MapPanel.java
--- 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));
}
More information about the Dive4elements-commits
mailing list