Ticket #32: move.2.patch
| File move.2.patch, 1.6 kB (added by tschaub, 1 year ago) |
|---|
-
lib/GeoExt/widgets/MapPanel.js
old new 119 119 }, 120 120 121 121 /** 122 * Method: updateMapSize 123 * Tell the map that it needs to recaculate its size and position. 124 */ 125 updateMapSize: function() { 126 if(this.map) { 127 this.map.updateSize(); 128 } 129 }, 130 131 /** 122 132 * Method: onRender 123 133 * Private method called after the panel has been 124 134 * rendered. … … 136 146 } 137 147 } 138 148 }, 149 150 /** 151 * Method: afterRender 152 * Private method called after the panel has been rendered. 153 */ 154 afterRender: function() { 155 GeoExt.MapPanel.superclass.afterRender.apply(this, arguments); 156 if(this.ownerCt) { 157 this.ownerCt.on("move", this.updateMapSize, this); 158 } 159 }, 139 160 140 161 /** 141 162 * Method: onResize … … 144 165 */ 145 166 onResize: function() { 146 167 GeoExt.MapPanel.superclass.onResize.apply(this, arguments); 147 this.map.updateSize(); 168 this.updateMapSize(); 169 }, 170 171 /** 172 * Method: onDestroy 173 * Private method called during the destroy sequence. 174 */ 175 onDestroy: function() { 176 if(this.ownerCt) { 177 this.ownerCt.un("move", this.updateMapSize, this); 178 } 179 GeoExt.MapPanel.superclass.onDestroy.apply(this, arguments); 148 180 } 181 149 182 }); 150 183 151 184 Ext.reg('gx_mappanel', GeoExt.MapPanel);