[OpenLayers-Commits] r4807 - sandbox/camptocamp/feature/lib/OpenLayers/Geometry
commits at openlayers.org
commits at openlayers.org
Thu Oct 4 03:37:57 EDT 2007
Author: pgiraud
Date: 2007-10-04 03:37:56 -0400 (Thu, 04 Oct 2007)
New Revision: 4807
Modified:
sandbox/camptocamp/feature/lib/OpenLayers/Geometry/LineString.js
Log:
getEdges method need to clone start and stop point before it uses them for the new linestring
Modified: sandbox/camptocamp/feature/lib/OpenLayers/Geometry/LineString.js
===================================================================
--- sandbox/camptocamp/feature/lib/OpenLayers/Geometry/LineString.js 2007-10-04 07:35:57 UTC (rev 4806)
+++ sandbox/camptocamp/feature/lib/OpenLayers/Geometry/LineString.js 2007-10-04 07:37:56 UTC (rev 4807)
@@ -48,8 +48,8 @@
getEdges: function() {
var edges = [];
for (var i = 0; i < this.components.length - 1; i++) {
- var start = this.components[i];
- var stop = this.components[i + 1];
+ var start = this.components[i].clone();
+ var stop = this.components[i + 1].clone();
edges = edges.concat(new OpenLayers.Geometry.LineString([start, stop]));
}
return edges;
More information about the Commits
mailing list