(continuation of r1359) -- tschaub points out that zoomBox and measureBox
are not the same thing, and also points out that he's already fixed the problem in a different and better way. Add in half of his patch, and keep the other on the back burner until I can review post 2.0 and see how much of this code needs a rewrite anyway. git-svn-id: http://svn.openlayers.org/branches/openlayers/2.0@1360 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -216,8 +216,8 @@ OpenLayers.Control.MouseToolbar.prototype =
|
||||
case "zoombox":
|
||||
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";
|
||||
this.zoomBox.style.height = deltaY+"px";
|
||||
this.zoomBox.style.width = Math.max(1, deltaX) + "px";
|
||||
this.zoomBox.style.height = Math.max(1, deltaY) + "px";
|
||||
if (evt.xy.x < this.mouseDragStart.x) {
|
||||
this.zoomBox.style.left = evt.xy.x+"px";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user