don’t duplicate defaults in renderers

This commit is contained in:
Antoine Abt
2012-01-05 10:26:05 +01:00
parent 0ff9d54d5c
commit 5be7e7f844
5 changed files with 23 additions and 12 deletions

View File

@@ -584,7 +584,7 @@ OpenLayers.Renderer.SVG2 = OpenLayers.Class(OpenLayers.Renderer.NG, {
} else {
text.setAttributeNS(null, "pointer-events", "none");
}
var align = style.labelAlign || "cm";
var align = style.labelAlign;
text.setAttributeNS(null, "text-anchor",
OpenLayers.Renderer.SVG2.LABEL_ALIGN[align[0]] || "middle");