From af7dc7661a7af31f7f031a5cfb517016d15326d2 Mon Sep 17 00:00:00 2001 From: Schuyler Erle Date: Mon, 22 May 2006 03:47:19 +0000 Subject: [PATCH] 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 --- lib/OpenLayers/Control/MouseDefaults.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/OpenLayers/Control/MouseDefaults.js b/lib/OpenLayers/Control/MouseDefaults.js index ee82c4d6cc..440ed2698a 100644 --- a/lib/OpenLayers/Control/MouseDefaults.js +++ b/lib/OpenLayers/Control/MouseDefaults.js @@ -51,10 +51,15 @@ OpenLayers.Control.MouseDefaults.prototype = defaultMouseMove: function (evt) { if (this.mouseDragStart != null) { 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) { this.defaultMouseUp(evt); return; } + */ var deltaX = Math.abs(this.mouseDragStart.x - evt.xy.x); var deltaY = Math.abs(this.mouseDragStart.y - evt.xy.y); this.zoomBox.style.width = deltaX+"px";