[OpenLayers-Commits] r10863 - in trunk/openlayers:
lib/OpenLayers/Renderer tests/Renderer
commits-20090109 at openlayers.org
commits-20090109 at openlayers.org
Thu Oct 28 02:44:35 EDT 2010
Author: fredj
Date: 2010-10-27 23:44:35 -0700 (Wed, 27 Oct 2010)
New Revision: 10863
Modified:
trunk/openlayers/lib/OpenLayers/Renderer/Canvas.js
trunk/openlayers/tests/Renderer/Canvas.html
Log:
avoid double redraw when panning/zooming. p=tsauerwein,r=erilem (closes #2801)
Modified: trunk/openlayers/lib/OpenLayers/Renderer/Canvas.js
===================================================================
--- trunk/openlayers/lib/OpenLayers/Renderer/Canvas.js 2010-10-27 10:26:05 UTC (rev 10862)
+++ trunk/openlayers/lib/OpenLayers/Renderer/Canvas.js 2010-10-28 06:44:35 UTC (rev 10863)
@@ -68,22 +68,6 @@
},
/**
- * 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.
*
Modified: trunk/openlayers/tests/Renderer/Canvas.html
===================================================================
--- trunk/openlayers/tests/Renderer/Canvas.html 2010-10-27 10:26:05 UTC (rev 10862)
+++ trunk/openlayers/tests/Renderer/Canvas.html 2010-10-28 06:44:35 UTC (rev 10863)
@@ -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");
}
More information about the Commits
mailing list