fix for #682 - let the mouseup event go through on the panel, just like all other controls

git-svn-id: http://svn.openlayers.org/trunk/openlayers@3106 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
euzuro
2007-05-01 14:21:21 +00:00
parent 9093fe746b
commit 8d2dfcf218

View File

@@ -129,6 +129,8 @@ OpenLayers.Control.Panel.prototype =
// 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 @@ OpenLayers.Control.Panel.prototype =
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