geoext/geoext2 — pull request #209 by marcjansen (2013-11-08 21:12:40+00:00)
Title: bug: Map Panel always reattaches the map to the panel

Thanks for GeoExt, we use it in our professional solution.

Since version GeoExt 2, the "GeoExt.panel.Map" object always try to reattach the OpenLayer Map object to the ExtJS panel when the panel is resized.

File: "src\GeoExt\panel\Map.js", Line 335:
```javascript
onResize: function() {
var map = this.map;
if(this.body.dom !== map.div) {
// the map has not been rendered yet
map.render(this.body.dom);
```
The code seems to be a way to apply the first attachment at the appropriate time. Nevertheless this technique prevents us from manually reattach later the Map to somewhere else. This could be needed by a full-screen feature for example.

I'm explaining: for our full-screen feature, the OpenLayer Map is attached to another ExtJs panel which cover the full navigator window. It is attached using "map.render(anotherDiv)". Unfortunately if the navigator window is resized at this time, GeoExt put back the map to the old DIV (see code above).

So it would be more advised if GeoExt attaches the Map to the Panel only once.