Ticket #1360: 1360-r6240-A0.patch
| File 1360-r6240-A0.patch, 2.1 kB (added by ahocevar, 1 year ago) |
|---|
-
lib/OpenLayers/Renderer/SVG.js
old new 192 192 setStyle: function(node, style, options) { 193 193 style = style || node._style; 194 194 options = options || node._options; 195 if (node._geometryClass == "OpenLayers.Geometry.Point") { 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) { 196 198 if (style.externalGraphic) { 197 var x = parseFloat(node.getAttributeNS(null, "cx"));199 x = parseFloat(x); 198 200 var y = parseFloat(node.getAttributeNS(null, "cy")); 199 201 200 202 if (style.graphicWidth && style.graphicHeight) { … … 337 339 node.setAttributeNS(null, "cy", y); 338 340 node.setAttributeNS(null, "r", radius); 339 341 } else { 340 if (node.parentNode == this.root) {341 this.root.removeChild(node);342 }342 node.setAttributeNS(null, "cx", ""); 343 node.setAttributeNS(null, "cy", ""); 344 node.setAttributeNS(null, "r", 0); 343 345 } 344 346 345 347 }, -
tests/Renderer/test_SVG.html
old new 155 155 156 156 r.drawCircle(node, geometry, "blah_4000"); 157 157 158 t.eq(node.getAttributeNS(null, 'cx'), ' 2', "cx is correct");159 t.eq(node.getAttributeNS(null, 'cy'), ' -4', "cy is correct");160 t.eq(node.getAttributeNS(null, 'r'), ' 3', "r is correct");158 t.eq(node.getAttributeNS(null, 'cx'), '', "cx is correct"); 159 t.eq(node.getAttributeNS(null, 'cy'), '', "cy is correct"); 160 t.eq(node.getAttributeNS(null, 'r'), '0', "r is correct"); 161 161 } 162 162 163 163 function test_SVG_drawlinestring(t) {
