Pullup fixes to mouse controls since 2.1-rc1, along with a fix for

zooming. 


git-svn-id: http://svn.openlayers.org/branches/openlayers/2.1@1481 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
crschmidt
2006-09-18 18:48:29 +00:00
parent 130e527702
commit 5f8dc06823
7 changed files with 83 additions and 32 deletions

View File

@@ -141,9 +141,12 @@ OpenLayers.Control.MouseDefaults.prototype =
* @param {Event} evt
*/
defaultMouseOut: function (evt) {
if (this.mouseDragStart != null
&& OpenLayers.Util.mouseLeft(evt, this.map.div)) {
this.defaultMouseUp(evt);
if (this.mouseDragStart != null &&
OpenLayers.Util.mouseLeft(evt, this.map.div)) {
if (this.zoomBox) {
this.removeZoomBox();
}
this.mouseDragStart = null;
}
},
@@ -188,9 +191,16 @@ OpenLayers.Control.MouseDefaults.prototype =
(end.lat)
), this.map.getZoom() + 1);
}
this.map.viewPortDiv.removeChild(this.zoomBox);
this.zoomBox = null;
}
this.removeZoomBox();
}
},
/**
* Remove the zoombox from the screen and nullify our reference to it.
*/
removeZoomBox: function() {
this.map.viewPortDiv.removeChild(this.zoomBox);
this.zoomBox = null;
},