Ticket #666: handler_bounds_polygon.patch
| File handler_bounds_polygon.patch, 1.6 kB (added by pgiraud, 1 year ago) |
|---|
-
/home/pierre/public_html/openlayers_666/lib/OpenLayers/Handler/Polygon.js
old new 78 78 var index = this.line.geometry.components.length - 2; 79 79 this.line.geometry.components[index].x = this.point.geometry.x; 80 80 this.line.geometry.components[index].y = this.point.geometry.y; 81 this.line.geometry.components[index].clearBounds(); 81 82 }, 82 83 83 84 /** -
/home/pierre/public_html/openlayers_666/tests/Handler/test_Polygon.html
old new 64 64 handler.mousedown(evt); 65 65 var evt = {xy: new OpenLayers.Pixel(125, 100), which: 1}; 66 66 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)), 68 68 "Correct bounds after dragging without letting go. (Came out as "+handler.line.geometry.getBounds().toBBOX() + ".)"); 69 69 } 70 70
