OpenLayers OpenLayers

Ticket #1066: Renderer.Elements.3.patch

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

updated patch made against r5614

  • lib/OpenLayers/Renderer/Elements.js

    old new  
    134134             
    135135            //now actually draw the node, and style it 
    136136            node = this.drawGeometryNode(node, geometry); 
    137             this.root.appendChild(node); 
     137             
     138            // append the node to root (but only if it's new) 
     139            if (node.parentNode != this.root) {  
     140                this.root.appendChild(node);  
     141            } 
    138142            this.postDraw(node); 
    139143        } else { 
    140144            node = OpenLayers.Util.getElement(geometry.id);