From 5f6a2209bad98d55458e9d521a46c0565fe208f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Junod?= Date: Tue, 22 Jun 2010 14:07:32 +0000 Subject: [PATCH] Handler.Box.destroy: destroy the dragHandler. r=bartvde (closes #2697) git-svn-id: http://svn.openlayers.org/trunk/openlayers@10422 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- lib/OpenLayers/Handler/Box.js | 11 +++++++++++ 1 file changed, 11 insertions(+) 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 */