diff --git a/lib/OpenLayers/Control/MouseDefaults.js b/lib/OpenLayers/Control/MouseDefaults.js index 189b0f5165..bd62e729b0 100644 --- a/lib/OpenLayers/Control/MouseDefaults.js +++ b/lib/OpenLayers/Control/MouseDefaults.js @@ -12,7 +12,7 @@ OpenLayers.Control.MouseDefaults.prototype = this.map.events.register( "mousedown", this, this.defaultMouseDown ); this.map.events.register( "mouseup", this, this.defaultMouseUp ); this.map.events.register( "mousemove", this, this.defaultMouseMove ); - //this.map.events.register( "mouseout", this, this.defaultMouseUp ); + this.map.events.register( "mouseout", this, this.defaultMouseOut ); }, /** @@ -33,10 +33,10 @@ OpenLayers.Control.MouseDefaults.prototype = this.zoomBox = OpenLayers.Util.createDiv('zoomBox'); this.zoomBox.style.border = '2px solid red'; this.zoomBox.style.backgroundColor = "white"; - this.zoomBox.style.filter = "alpha(opacity=35)"; // IE - this.zoomBox.style.opacity = "0.35"; + this.zoomBox.style.filter = "alpha(opacity=50)"; // IE + this.zoomBox.style.opacity = "0.50"; this.zoomBox.style.position="absolute"; - this.zoomBox.style.zIndex=1000; + this.zoomBox.style.zIndex = this.map.Z_INDEX_BASE["Popup"] - 1; this.zoomBox.style.top=this.mouseDragStart.y; this.zoomBox.style.left=this.mouseDragStart.x; this.map.viewPortDiv.appendChild(this.zoomBox); @@ -97,7 +97,13 @@ OpenLayers.Control.MouseDefaults.prototype = } this.mouseDragStart = null; this.map.div.style.cursor = "default"; - } + }, + defaultMouseOut: function (evt) { + if (this.mouseDragStart != null + && OpenLayers.Util.mouseLeft(evt, this.map.div)) { + this.defaultMouseUp(evt); + } + } });