canvas and textAlign: middle not recognized, I made one change to original patch to not include the default value in LABEL_ALIGN since I did not see the purpose of adding that, p=fredj, r=me (closes #2439)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@10113 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
bartvde
2010-03-19 08:14:48 +00:00
parent 3e5bd85849
commit fc4e05dd83

View File

@@ -371,7 +371,7 @@ OpenLayers.Renderer.Canvas = OpenLayers.Class(OpenLayers.Renderer, {
// HTML5
var labelAlign =
OpenLayers.Renderer.Canvas.LABEL_ALIGN[style.labelAlign[0]] ||
"middle";
"center";
this.canvas.font = fontStyle;
this.canvas.textAlign = labelAlign;
this.canvas.fillText(style.label, pt[0], pt[1]);