Made the layer switcher a bit more responsive in IE. It would be nice if we could figure out how to keep the text from being selected when the switcher is clicked.
git-svn-id: http://svn.openlayers.org/branches/openlayers/1.0@730 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -143,6 +143,8 @@ OpenLayers.Control.LayerSwitcher.prototype =
|
|||||||
backdropLabelOuter.style.marginTop = "4px";
|
backdropLabelOuter.style.marginTop = "4px";
|
||||||
backdropLabelOuter.style.marginBottom = "4px";
|
backdropLabelOuter.style.marginBottom = "4px";
|
||||||
|
|
||||||
|
this._setEventHandlers(backdropLabelOuter);
|
||||||
|
|
||||||
// Inner Label - for Rico Corners
|
// Inner Label - for Rico Corners
|
||||||
//
|
//
|
||||||
var backdropLabel = document.createElement('p');
|
var backdropLabel = document.createElement('p');
|
||||||
@@ -191,9 +193,10 @@ OpenLayers.Control.LayerSwitcher.prototype =
|
|||||||
_setEventHandlers : function(element, labelDiv) {
|
_setEventHandlers : function(element, labelDiv) {
|
||||||
|
|
||||||
// We only want to respond to a mousedown event.
|
// We only want to respond to a mousedown event.
|
||||||
element.onclick = this.ignoreEvent.bindAsEventListener(this);
|
element.onclick = this.singleClick.bindAsEventListener(this);
|
||||||
element.ondblclick = this.ignoreEvent.bindAsEventListener(this);
|
element.ondblclick = this.singleClick.bindAsEventListener(this);
|
||||||
element.onmousedown = this.singleClick.bindAsEventListener(this);
|
element.onmouseup = this.ignoreEvent.bindAsEventListener(this);
|
||||||
|
element.onmousedown = this.ignoreEvent.bindAsEventListener(this);
|
||||||
|
|
||||||
// If we are operating on a corner span we need to store a
|
// If we are operating on a corner span we need to store a
|
||||||
// reference to the actual tab. (See comment about OL #57 fix above.)
|
// reference to the actual tab. (See comment about OL #57 fix above.)
|
||||||
|
|||||||
Reference in New Issue
Block a user