[OpenLayers-Commits] r3106 - trunk/openlayers/lib/OpenLayers/Control

commits at openlayers.org commits at openlayers.org
Tue May 1 10:21:25 EDT 2007


Author: euzuro
Date: 2007-05-01 10:21:21 -0400 (Tue, 01 May 2007)
New Revision: 3106

Modified:
   trunk/openlayers/lib/OpenLayers/Control/Panel.js
Log:
fix for #682 - let the mouseup event go through on the panel, just like all other controls

Modified: trunk/openlayers/lib/OpenLayers/Control/Panel.js
===================================================================
--- trunk/openlayers/lib/OpenLayers/Control/Panel.js	2007-05-01 14:20:03 UTC (rev 3105)
+++ trunk/openlayers/lib/OpenLayers/Control/Panel.js	2007-05-01 14:21:21 UTC (rev 3106)
@@ -129,6 +129,8 @@
         // Give each control a panel_div which will be used later.
         // Access to this div is via the panel_div attribute of the 
         // control added to the panel.
+        // Also, stop mousedowns and clicks, but don't stop mouseup,
+        // since they need to pass through.
         for (var i = 0; i < controls.length; i++) {
             var element = document.createElement("div");
             var textNode = document.createTextNode(" ");
@@ -137,8 +139,6 @@
                                      this.onClick.bind(this, controls[i]));
             OpenLayers.Event.observe(controls[i].panel_div, "mousedown", 
                               OpenLayers.Event.stop.bindAsEventListener());
-            OpenLayers.Event.observe(controls[i].panel_div, "mouseup", 
-                                  OpenLayers.Event.stop.bindAsEventListener());
         }    
 
         if (this.map) { // map.addControl() has already been called on the panel



More information about the Commits mailing list