fixed rendering but in FF3 when resizing graphicName symbols.

r=crschmidt (fixes #1650)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@7669 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
ahocevar
2008-08-01 18:43:31 +00:00
parent 2b8cc7e0fd
commit a59e7f0f4e

View File

@@ -243,9 +243,14 @@ OpenLayers.Renderer.SVG = OpenLayers.Class(OpenLayers.Renderer.Elements, {
var offset = style.pointRadius * 3;
var size = offset * 2;
var id = this.importSymbol(style.graphicName);
var href = "#" + id;
pos = this.getPosition(node);
widthFactor = this.symbolSize[id] / size;
node.setAttributeNS(this.xlinkns, "href", "#" + id);
// Only set the href if it is different from the current one.
// This is a workaround for strange rendering behavior in FF3.
if (node.getAttribute("href") != href) {
node.setAttributeNS(this.xlinkns, "href", href);
}
node.setAttributeNS(null, "width", size);
node.setAttributeNS(null, "height", size);
node.setAttributeNS(null, "x", pos.x - offset);