Another typo.

This commit is contained in:
thednp 2018-10-19 08:47:48 +03:00
parent 207597efe7
commit fafbf484df
3 changed files with 4 additions and 3 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -215,6 +215,7 @@
},
getPolyLength = function(el){ // getPolygonLength / getPolylineLength - return the length of the Polygon / Polyline
var points = el.getAttribute('points').split(' '), len = 0;
console.log(points)
if (points.length > 1) {
var coord = function (p) {
var c = p.split(',');
@ -235,7 +236,7 @@
len += dist(coord(points[i]), coord(points[i+1]));
}
}
len += el.tagName === 'polygon' ? dist(coord(points[0]), coord(points[points[length] - 1])) : 0;
len += el.tagName === 'polygon' ? dist(coord(points[0]), coord(points[points.length - 1])) : 0;
}
return len;
},