avoid double redraw when panning/zooming. p=tsauerwein,r=erilem (closes #2801)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@10863 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
Frédéric Junod
2010-10-28 06:44:35 +00:00
parent 8024e58177
commit 7fd84b613d
2 changed files with 1 additions and 17 deletions

View File

@@ -67,22 +67,6 @@ OpenLayers.Renderer.Canvas = OpenLayers.Class(OpenLayers.Renderer, {
return !!canvas.getContext;
},
/**
* Method: setExtent
* Set the visible part of the layer.
*
* Resolution has probably changed, so we nullify the resolution
* cache (this.resolution), then redraw.
*
* Parameters:
* extent - {<OpenLayers.Bounds>}
*/
setExtent: function(extent) {
this.extent = extent.clone();
this.resolution = null;
this.redraw();
},
/**
* Method: setSize
* Sets the size of the drawing surface.

View File

@@ -23,7 +23,7 @@
var extent = new OpenLayers.Bounds(1,2,3,4);
r.resolution = 1;
r.setExtent(extent);
r.setExtent(extent, true);
t.ok(r.extent.equals(extent), "extent is correctly set");
t.eq(r.resolution, null, "resolution nullified");
}