OpenLayers OpenLayers

Changeset 1360

Show
Ignore:
Timestamp:
08/24/06 11:20:48 (2 years ago)
Author:
crschmidt
Message:

(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.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/openlayers/2.0/lib/OpenLayers/Control/MouseToolbar.js

    r1357 r1360  
    217217                    var deltaX = Math.abs(this.mouseDragStart.x - evt.xy.x); 
    218218                    var deltaY = Math.abs(this.mouseDragStart.y - evt.xy.y); 
    219                     this.zoomBox.style.width = deltaX+"px"; 
    220                     this.zoomBox.style.height = deltaY+"px"; 
     219                    this.zoomBox.style.width = Math.max(1, deltaX) + "px"; 
     220                    this.zoomBox.style.height = Math.max(1, deltaY) + "px"; 
    221221                    if (evt.xy.x < this.mouseDragStart.x) { 
    222222                        this.zoomBox.style.left = evt.xy.x+"px";