OpenLayers OpenLayers

Ticket #1066: Renderer.Elements.2.patch

File Renderer.Elements.2.patch, 0.7 kB (added by pgiraud, 1 year ago)

new patch integrating Chris suggestions

  • lib/OpenLayers/Renderer/Elements.js

    old new  
    127127        node._featureId = featureId; 
    128128        node._geometryClass = geometry.CLASS_NAME; 
    129129        node._style = style; 
    130         this.root.appendChild(node); 
     130         
     131        // append the node to root 
     132        // if it already is a child, keep it in place instead 
     133        if (node.parentNode != this.root) { 
     134            this.root.appendChild(node); 
     135        } 
    131136         
    132137        //now actually draw the node, and style it 
    133138        this.drawGeometryNode(node, geometry);