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)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@6515 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
ahocevar
2008-03-13 09:49:43 +00:00
parent 9b1cf1ef01
commit 31f769b61a

View File

@@ -192,11 +192,10 @@ OpenLayers.Renderer.SVG = OpenLayers.Class(OpenLayers.Renderer.Elements, {
setStyle: function(node, style, options) {
style = style || node._style;
options = options || node._options;
var x = node.getAttributeNS(null, "cx");
// if x equals "", the node is outside the valid range
if (node._geometryClass == "OpenLayers.Geometry.Point" && x) {
var r = parseFloat(node.getAttributeNS(null, "r"));
if (node._geometryClass == "OpenLayers.Geometry.Point" && r) {
if (style.externalGraphic) {
x = parseFloat(x);
var x = parseFloat(node.getAttributeNS(null, "cx"));
var y = parseFloat(node.getAttributeNS(null, "cy"));
if (style.graphicWidth && style.graphicHeight) {