diff gnv/src/main/webapp/scripts/viewport.jsp @ 1017:cce6596560e6

After resizing the window, the map panel is resized as well (currently just the width changes) (issue307). gnv/trunk@1247 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Wed, 30 Jun 2010 05:50:46 +0000
parents 3665834344a8
children 4eb7fa8a36ed
line wrap: on
line diff
--- a/gnv/src/main/webapp/scripts/viewport.jsp	Tue Jun 29 15:41:10 2010 +0000
+++ b/gnv/src/main/webapp/scripts/viewport.jsp	Wed Jun 30 05:50:46 2010 +0000
@@ -100,7 +100,6 @@
         region: "center",
         map: map,
         layers: layers
-        
     });
 
     //map.setCenter(INITIAL_CENTER);
@@ -292,4 +291,11 @@
     });
     <%}%>
     map.zoomToExtent(CURRENT_EXTENT);
+
+    // some code for automatically resizing the map panel if the window size
+    // changes
+    window.onresize=function() {
+        var mapcontainer = Ext.get('mapcontainer');
+        mapPanel.setSize(mapcontainer.getSize());
+    }
 });

http://dive4elements.wald.intevation.org