[OpenLayers-Commits] r11729 - trunk/openlayers/lib/OpenLayers/Handler

commits-20090109 at openlayers.org commits-20090109 at openlayers.org
Sun Mar 27 13:00:41 EDT 2011


Author: ahocevar
Date: 2011-03-27 10:00:38 -0700 (Sun, 27 Mar 2011)
New Revision: 11729

Modified:
   trunk/openlayers/lib/OpenLayers/Handler/Box.js
Log:
removing box when deactivating the handler. p=jorix, r=me (closes #3198)

Modified: trunk/openlayers/lib/OpenLayers/Handler/Box.js
===================================================================
--- trunk/openlayers/lib/OpenLayers/Handler/Box.js	2011-03-25 16:48:15 UTC (rev 11728)
+++ trunk/openlayers/lib/OpenLayers/Handler/Box.js	2011-03-27 17:00:38 UTC (rev 11729)
@@ -183,7 +183,11 @@
      */
     deactivate: function () {
         if (OpenLayers.Handler.prototype.deactivate.apply(this, arguments)) {
-            this.dragHandler.deactivate();
+            if (this.dragHandler.deactivate()) {
+                if (this.zoomBox) {
+                    this.removeBox();
+                }
+            }
             return true;
         } else {
             return false;



More information about the Commits mailing list