Fix to mouseposition destroy from fredj

git-svn-id: http://svn.openlayers.org/trunk/openlayers@4431 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
crschmidt
2007-09-21 11:44:36 +00:00
parent 85e9e30908
commit 0307d4868a
3 changed files with 56 additions and 0 deletions

View File

@@ -61,6 +61,16 @@ OpenLayers.Control.MousePosition = OpenLayers.Class(OpenLayers.Control, {
OpenLayers.Control.prototype.initialize.apply(this, arguments);
},
/**
* Method: destroy
*/
destroy: function() {
if (this.map) {
this.map.events.unregister('mousemove', this, this.redraw);
}
OpenLayers.Control.prototype.destroy.apply(this, arguments);
},
/**
* Method: draw
* {DOMElement}