OpenLayers OpenLayers

Ticket #1360: 1360-r6496-B0.patch

File 1360-r6496-B0.patch, 1.0 kB (added by ahocevar, 9 months ago)
  • lib/OpenLayers/Renderer/SVG.js

    old new  
    192192    setStyle: function(node, style, options) { 
    193193        style = style  || node._style; 
    194194        options = options || node._options; 
    195         var x = node.getAttributeNS(null, "cx"); 
    196         // if x equals "", the node is outside the valid range 
    197         if (node._geometryClass == "OpenLayers.Geometry.Point" && x) { 
     195        var r = parseFloat(node.getAttributeNS(null, "r")); 
     196        if (node._geometryClass == "OpenLayers.Geometry.Point" && r) { 
    198197            if (style.externalGraphic) { 
    199                 x = parseFloat(x); 
     198                var x = parseFloat(node.getAttributeNS(null, "cx")); 
    200199                var y = parseFloat(node.getAttributeNS(null, "cy")); 
    201200                 
    202201                if (style.graphicWidth && style.graphicHeight) {