Removing duplicate setCanvasStyle method.
Thanks @jorix for catching this (see #238).
This commit is contained in:
@@ -434,28 +434,6 @@ OpenLayers.Renderer.Canvas = OpenLayers.Class(OpenLayers.Renderer, {
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Method: setCanvasStyle
|
||||
* Prepare the canvas for drawing by setting various global settings.
|
||||
*
|
||||
* Parameters:
|
||||
* type - {String} one of 'stroke', 'fill', or 'reset'
|
||||
* style - {Object} Symbolizer hash
|
||||
*/
|
||||
setCanvasStyle: function(type, style) {
|
||||
if (type === "fill") {
|
||||
this.canvas.globalAlpha = style['fillOpacity'];
|
||||
this.canvas.fillStyle = style['fillColor'];
|
||||
} else if (type === "stroke") {
|
||||
this.canvas.globalAlpha = style['strokeOpacity'];
|
||||
this.canvas.strokeStyle = style['strokeColor'];
|
||||
this.canvas.lineWidth = style['strokeWidth'];
|
||||
} else {
|
||||
this.canvas.globalAlpha = 0;
|
||||
this.canvas.lineWidth = 1;
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Method: featureIdToHex
|
||||
* Convert a feature ID string into an RGB hex string.
|
||||
|
||||
Reference in New Issue
Block a user