From c15a1a0779c85096d199dfa1df3cc33271449380 Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Thu, 5 Aug 2010 15:34:48 +0000 Subject: [PATCH] Making it so the clear method on the canvas renderer permanently clears features (as with the other renderers). r=crschmidt (closes #2775) git-svn-id: http://svn.openlayers.org/trunk/openlayers@10595 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- lib/OpenLayers/Renderer/Canvas.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/OpenLayers/Renderer/Canvas.js b/lib/OpenLayers/Renderer/Canvas.js index ed743373d6..8fb0e81dbf 100644 --- a/lib/OpenLayers/Renderer/Canvas.js +++ b/lib/OpenLayers/Renderer/Canvas.js @@ -393,14 +393,14 @@ OpenLayers.Renderer.Canvas = OpenLayers.Class(OpenLayers.Renderer, { var y = ((extent.top / resolution) - point.y / resolution); return [x, y]; }, - + /** * Method: clear * Clear all vectors from the renderer. - * virtual function. */ clear: function() { this.canvas.clearRect(0, 0, this.root.width, this.root.height); + this.features = {}; }, /** @@ -458,7 +458,7 @@ OpenLayers.Renderer.Canvas = OpenLayers.Class(OpenLayers.Renderer, { */ redraw: function() { if (!this.locked) { - this.clear(); + this.canvas.clearRect(0, 0, this.root.width, this.root.height); var labelMap = []; var feature, style; for (var id in this.features) {