Remove event listeners on image div in Tile.Image.destroy(). Fixes #576.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2917 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -32,9 +32,12 @@ OpenLayers.Tile.Image.prototype =
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
destroy: function() {
|
destroy: function() {
|
||||||
if ((this.imgDiv != null) && (this.imgDiv.parentNode == this.layer.div)) {
|
if (this.imgDiv != null) {
|
||||||
this.layer.div.removeChild(this.imgDiv);
|
OpenLayers.Event.stopObservingElement(this.imgDiv.id);
|
||||||
this.imgDiv.map = null;
|
if (this.imgDiv.parentNode == this.layer.div) {
|
||||||
|
this.layer.div.removeChild(this.imgDiv);
|
||||||
|
this.imgDiv.map = null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
this.imgDiv = null;
|
this.imgDiv = null;
|
||||||
OpenLayers.Tile.prototype.destroy.apply(this, arguments);
|
OpenLayers.Tile.prototype.destroy.apply(this, arguments);
|
||||||
|
|||||||
Reference in New Issue
Block a user