Commented out code to cancel zoom box if shift key is released before left mouse button. I find myself doing this consistently by accident, so we should probably find another way to cancel the zoom, like hittin ESC or something.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@245 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -51,10 +51,15 @@ OpenLayers.Control.MouseDefaults.prototype =
|
|||||||
defaultMouseMove: function (evt) {
|
defaultMouseMove: function (evt) {
|
||||||
if (this.mouseDragStart != null) {
|
if (this.mouseDragStart != null) {
|
||||||
if (this.zoomBox) {
|
if (this.zoomBox) {
|
||||||
|
/* after initially suggesting it, I'm not so sure
|
||||||
|
* this is a good idea ...
|
||||||
|
* I always let up off the shift key too early
|
||||||
|
* and cancel my zoombox by accident - SDE
|
||||||
if (!evt.shiftKey) {
|
if (!evt.shiftKey) {
|
||||||
this.defaultMouseUp(evt);
|
this.defaultMouseUp(evt);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
var deltaX = Math.abs(this.mouseDragStart.x - evt.xy.x);
|
var deltaX = Math.abs(this.mouseDragStart.x - evt.xy.x);
|
||||||
var deltaY = Math.abs(this.mouseDragStart.y - evt.xy.y);
|
var deltaY = Math.abs(this.mouseDragStart.y - evt.xy.y);
|
||||||
this.zoomBox.style.width = deltaX+"px";
|
this.zoomBox.style.width = deltaX+"px";
|
||||||
|
|||||||
Reference in New Issue
Block a user