Ticket #32: move.patch
| File move.patch, 1.9 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: destroy 173 * Destroys this component by purging any event listeners, removing the 174 * component's element from the DOM, removing the component from its 175 * container (if applicable) and unregistering it from Ext.ComponentMgr. 176 * Destruction is generally handled automatically by the framework and 177 * this method should usually not need to be called directly. 178 */ 179 destroy: function() { 180 if(this.ownerCt) { 181 this.ownerCt.un("move", this.updateMapSize, this); 182 } 183 GeoExt.MapPanel.superclass.destroy.apply(this, arguments); 148 184 } 185 149 186 }); 150 187 151 188 Ext.reg('gx_mappanel', GeoExt.MapPanel);