# HG changeset patch # User Ingo Weinzierl # Date 1277877046 0 # Node ID cce6596560e61a3355e2c16cb35d8220a5e63530 # Parent 3665834344a824279c59e5775a7e7286df2690c9 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 diff -r 3665834344a8 -r cce6596560e6 gnv/ChangeLog --- a/gnv/ChangeLog Tue Jun 29 15:41:10 2010 +0000 +++ b/gnv/ChangeLog Wed Jun 30 05:50:46 2010 +0000 @@ -1,3 +1,14 @@ +2010-06-30 Ingo Weinzierl + + Issue307 + + * src/main/webapp/scripts/viewport.jsp: Added a 'resize' listener for the + browser window. If the browser window is resized, the size of the map + panel is adapted. For example, you have a small browser window at the + beginning and resize it later to its maximal size, the map panel takes all + the place it can get. Currently, just the width is adapted, because outer + div container has a fix height that doesn't change. + 2010-06-29 Tim Englich ISSU317 diff -r 3665834344a8 -r cce6596560e6 gnv/src/main/webapp/scripts/viewport.jsp --- 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()); + } });