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
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user