diff --git a/lib/OpenLayers/Handler/Box.js b/lib/OpenLayers/Handler/Box.js index 3f1d9cf575..a90ef3499e 100644 --- a/lib/OpenLayers/Handler/Box.js +++ b/lib/OpenLayers/Handler/Box.js @@ -60,6 +60,17 @@ OpenLayers.Handler.Box = OpenLayers.Class(OpenLayers.Handler, { this, callbacks, {keyMask: this.keyMask}); }, + /** + * Method: destroy + */ + destroy(): function() { + if (this.dragHandler) { + this.dragHandler.destroy(); + this.dragHandler = null; + } + OpenLayers.Handler.prototype.destroy.apply(this, arguments); + }, + /** * Method: setMap */