Changeset 6380
- Timestamp:
- 02/26/08 19:47:55 (9 months ago)
- Files:
-
- trunk/openlayers/lib/OpenLayers/Renderer/SVG.js (modified) (2 diffs)
- trunk/openlayers/tests/Renderer/test_SVG.html (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/openlayers/lib/OpenLayers/Renderer/SVG.js
r6200 r6380 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 … … 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 trunk/openlayers/tests/Renderer/test_SVG.html
r6131 r6380 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
