OpenLayers OpenLayers

Changeset 4217

Show
Ignore:
Timestamp:
09/11/07 10:26:08 (1 year ago)
Author:
crschmidt
Message:

Fix lacking code from #666-- I had originally wanted to add this, but couldn't
craft a test which exposed the lack ... until i realized with pgiraud's help
that my test was backwards to begin with. (Closes #666)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/openlayers/lib/OpenLayers/Handler/Polygon.js

    r4110 r4217  
    7979        this.line.geometry.components[index].x = this.point.geometry.x; 
    8080        this.line.geometry.components[index].y = this.point.geometry.y; 
     81        this.line.geometry.components[index].clearBounds(); 
    8182    }, 
    8283 
  • trunk/openlayers/tests/Handler/test_Polygon.html

    r4077 r4217  
    6565        var evt = {xy: new OpenLayers.Pixel(125, 100), which: 1}; 
    6666        handler.mousemove(evt); 
    67         t.ok(handler.polygon.geometry.getBounds().equals(new OpenLayers.Bounds(0,-35.15625,35.15625,0)), 
     67        t.ok(!handler.polygon.geometry.getBounds().equals(new OpenLayers.Bounds(0,-35.15625,35.15625,0)), 
    6868             "Correct bounds after dragging without letting go. (Came out as "+handler.line.geometry.getBounds().toBBOX() + ".)"); 
    6969    }