[OpenLayers-Commits] r11806 -
sandbox/tschaub/canvas/lib/OpenLayers/Renderer
commits-20090109 at openlayers.org
commits-20090109 at openlayers.org
Wed Mar 30 16:52:02 EDT 2011
Author: tschaub
Date: 2011-03-30 13:52:01 -0700 (Wed, 30 Mar 2011)
New Revision: 11806
Modified:
sandbox/tschaub/canvas/lib/OpenLayers/Renderer/Canvas.js
Log:
Changes from fredj's patch.
Modified: sandbox/tschaub/canvas/lib/OpenLayers/Renderer/Canvas.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Renderer/Canvas.js 2011-03-30 20:22:45 UTC (rev 11805)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Renderer/Canvas.js 2011-03-30 20:52:01 UTC (rev 11806)
@@ -188,8 +188,8 @@
var width = style.graphicWidth || style.graphicHeight;
var height = style.graphicHeight || style.graphicWidth;
- width = width ? width : style.pointRadius*2;
- height = height ? height : style.pointRadius*2;
+ width = width ? width : style.pointRadius * 2;
+ height = height ? height : style.pointRadius * 2;
var xOffset = (style.graphicXOffset != undefined) ?
style.graphicXOffset : -(0.5 * width);
var yOffset = (style.graphicYOffset != undefined) ?
@@ -261,10 +261,10 @@
* style - {Object} Symbolizer hash
*/
setCanvasStyle: function(type, style) {
- if (type == "fill") {
+ if (type === "fill") {
this.canvas.globalAlpha = style['fillOpacity'];
this.canvas.fillStyle = style['fillColor'];
- } else if (type == "stroke") {
+ } else if (type === "stroke") {
this.canvas.globalAlpha = style['strokeOpacity'];
this.canvas.strokeStyle = style['strokeColor'];
this.canvas.lineWidth = style['strokeWidth'];
More information about the Commits
mailing list