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:
@@ -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;
|
||||
},
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user