[OpenLayers-Commits] r11000 - trunk/openlayers/lib/OpenLayers/Geometry

commits-20090109 at openlayers.org commits-20090109 at openlayers.org
Wed Jan 5 02:59:46 EST 2011


Author: erilem
Date: 2011-01-04 23:59:46 -0800 (Tue, 04 Jan 2011)
New Revision: 11000

Modified:
   trunk/openlayers/lib/OpenLayers/Geometry/LineString.js
Log:
missing var declaration in LineString.js, p=jorix, r=me (closes #3001)

Modified: trunk/openlayers/lib/OpenLayers/Geometry/LineString.js
===================================================================
--- trunk/openlayers/lib/OpenLayers/Geometry/LineString.js	2011-01-04 08:30:07 UTC (rev 10999)
+++ trunk/openlayers/lib/OpenLayers/Geometry/LineString.js	2011-01-05 07:59:46 UTC (rev 11000)
@@ -578,7 +578,7 @@
                 var maxDistance = 0;
                 var indexFarthest = 0;
     
-                for (var index = firstPoint; index < lastPoint; index++) {
+                for (var index = firstPoint, distance; index < lastPoint; index++) {
                     distance = perpendicularDistance(points[firstPoint], points[lastPoint], points[index]);
                     if (distance > maxDistance) {
                         maxDistance = distance;



More information about the Commits mailing list