use array join instead of string concat. r=ahocevar (closes #2713)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10431 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -915,7 +915,7 @@ OpenLayers.Renderer.SVG = OpenLayers.Class(OpenLayers.Renderer.Elements, {
|
||||
var symbolExtent = new OpenLayers.Bounds(
|
||||
Number.MAX_VALUE, Number.MAX_VALUE, 0, 0);
|
||||
|
||||
var points = "";
|
||||
var points = [];
|
||||
var x,y;
|
||||
for (var i=0; i<symbol.length; i=i+2) {
|
||||
x = symbol[i];
|
||||
@@ -924,10 +924,10 @@ OpenLayers.Renderer.SVG = OpenLayers.Class(OpenLayers.Renderer.Elements, {
|
||||
symbolExtent.bottom = Math.min(symbolExtent.bottom, y);
|
||||
symbolExtent.right = Math.max(symbolExtent.right, x);
|
||||
symbolExtent.top = Math.max(symbolExtent.top, y);
|
||||
points += " " + x + "," + y;
|
||||
points.push(x, ",", y);
|
||||
}
|
||||
|
||||
node.setAttributeNS(null, "points", points);
|
||||
node.setAttributeNS(null, "points", points.join(" "));
|
||||
|
||||
var width = symbolExtent.getWidth();
|
||||
var height = symbolExtent.getHeight();
|
||||
|
||||
Reference in New Issue
Block a user