Return false from DoubleClick and Click events in controls so that these events don't filter through and hit the onclick handlers that we might register on the map.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@572 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -115,6 +115,7 @@ OpenLayers.Control.LayerSwitcher.prototype =
|
||||
*/
|
||||
doubleClick: function(evt) {
|
||||
Event.stop(evt);
|
||||
return false;
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -144,6 +145,7 @@ OpenLayers.Control.LayerSwitcher.prototype =
|
||||
backdropLabel.layer = layer;
|
||||
|
||||
// set event handlers
|
||||
backdropLabelOuter.onclick = this.doubleClick.bindAsEventListener(this);
|
||||
backdropLabelOuter.ondblclick = this.doubleClick.bindAsEventListener(this);
|
||||
backdropLabelOuter.onmousedown = this.singleClick.bindAsEventListener(this);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user