OpenLayers OpenLayers

Changeset 6515

Show
Ignore:
Timestamp:
03/13/08 05:49:43 (9 months ago)
Author:
ahocevar
Message:

Prevent SVG renderer from drawing features in the upperleft corner of the map pane when coordinates are outside range. The fix in r6380 did not work properly. r=crschmidt (closes #1360)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/openlayers/lib/OpenLayers/Renderer/SVG.js

    r6380 r6515  
    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