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:
@@ -243,9 +243,14 @@ OpenLayers.Renderer.SVG = OpenLayers.Class(OpenLayers.Renderer.Elements, {
|
|||||||
var offset = style.pointRadius * 3;
|
var offset = style.pointRadius * 3;
|
||||||
var size = offset * 2;
|
var size = offset * 2;
|
||||||
var id = this.importSymbol(style.graphicName);
|
var id = this.importSymbol(style.graphicName);
|
||||||
|
var href = "#" + id;
|
||||||
pos = this.getPosition(node);
|
pos = this.getPosition(node);
|
||||||
widthFactor = this.symbolSize[id] / size;
|
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, "width", size);
|
||||||
node.setAttributeNS(null, "height", size);
|
node.setAttributeNS(null, "height", size);
|
||||||
node.setAttributeNS(null, "x", pos.x - offset);
|
node.setAttributeNS(null, "x", pos.x - offset);
|
||||||
|
|||||||
Reference in New Issue
Block a user