changeset 4571:95e23bcf6a50

Fix FLYS logo URL for printing. Remove obsolete code from MapPanel.
author Christian Lins <christian.lins@intevation.de>
date Tue, 20 Nov 2012 15:28:07 +0100
parents 8ca06d3040d0
children 4bd42fe098b4 e8c6fbed889b
files flys-client/src/main/java/de/intevation/flys/client/client/ui/map/MapPanel.java flys-client/src/main/webapp/WEB-INF/config.yaml
diffstat 2 files changed, 6 insertions(+), 24 deletions(-) [+]
line wrap: on
line diff
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/map/MapPanel.java	Tue Nov 20 14:30:33 2012 +0100
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/map/MapPanel.java	Tue Nov 20 15:28:07 2012 +0100
@@ -1,8 +1,6 @@
 package de.intevation.flys.client.client.ui.map;
 
 import com.google.gwt.core.client.GWT;
-import com.smartgwt.client.widgets.Canvas;
-import com.smartgwt.client.widgets.WidgetCanvas;
 import com.smartgwt.client.widgets.events.ParentMovedEvent;
 import com.smartgwt.client.widgets.events.ParentMovedHandler;
 import com.smartgwt.client.widgets.events.ResizedEvent;
@@ -69,21 +67,6 @@
         });
     }
 
-    /**
-     * Due to the fact that SmartGWT Layout misses a removeMember(Widget)
-     * method we use this method to remove all WidgetCanvas members.
-     * WidgetCanvas is the wrapper class used by Layout to handle Widget
-     * objects.
-     */
-    protected void removeWidgetCanvasMember() {
-        Canvas[] allCanvas = getMembers();
-        for (Canvas canvas : allCanvas) {
-            if (canvas instanceof WidgetCanvas) {
-                removeMember(canvas);
-            }
-        }
-    }
-
     protected void doLayout() {
         int width = getWidth();
         int height = getHeight();
@@ -92,12 +75,11 @@
         width -= 2; // minus black borders
         height -= toolbar.getHeight() + 4;
 
-        // Recreate Map widget
-        /*removeWidgetCanvasMember();
-        floodMap.recreateWidget(width, height);
-        floodMapWidget = floodMap.getMapWidget();
-        addMember(floodMapWidget);
-*/
+        if (width < 0 || height < 0) {
+            GWT.log("MapPanel: Oops what a size!");
+            return;
+        }
+
         floodMapWidget.setSize(Integer.toString(width), Integer.toString(height));
         floodMapWidget.getMap().updateSize();
     }
--- a/flys-client/src/main/webapp/WEB-INF/config.yaml	Tue Nov 20 14:30:33 2012 +0100
+++ b/flys-client/src/main/webapp/WEB-INF/config.yaml	Tue Nov 20 15:28:07 2012 +0100
@@ -122,7 +122,7 @@
             maxWidth: 60
             maxHeight: 60
             # Fixme: Replace with local file or self-hosted link...
-            url: http://ubuntuone.com/7hTz3YznHfMciAUj6FSle4
+            url: '${configDir}/../images/FLYS_Logo.png'
       items:
         - !text
             font: Helvetica

http://dive4elements.wald.intevation.org