OpenLayers OpenLayers

Changeset 7669

Show
Ignore:
Timestamp:
08/01/08 14:43:31 (4 months ago)
Author:
ahocevar
Message:

fixed rendering but in FF3 when resizing graphicName symbols.
r=crschmidt (fixes #1650)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/openlayers/lib/OpenLayers/Renderer/SVG.js

    r7634 r7669  
    244244                var size = offset * 2; 
    245245                var id = this.importSymbol(style.graphicName); 
     246                var href = "#" + id; 
    246247                pos = this.getPosition(node); 
    247248                widthFactor = this.symbolSize[id] / size; 
    248                 node.setAttributeNS(this.xlinkns, "href", "#" + id); 
     249                // Only set the href if it is different from the current one. 
     250                // This is a workaround for strange rendering behavior in FF3. 
     251                if (node.getAttribute("href") != href) { 
     252                    node.setAttributeNS(this.xlinkns, "href", href); 
     253                } 
    249254                node.setAttributeNS(null, "width", size); 
    250255                node.setAttributeNS(null, "height", size);