Commit 8d91a077 authored by Kuba Wyrostek's avatar Kuba Wyrostek

Do not add interpolated points between points with null values.

parent ca1f2137
......@@ -205,10 +205,13 @@ ____________________________________________________
result.push(points[curX]);
result.push(points[curY]);
//add curve point
for (var x = (xStart += xStep); x < xEnd; x += xStep) {
result.push(x);
result.push(splines[j](x));
//add curve point; skip between nulls
if (typeof points[curX] === 'number' && typeof points[curY] === 'number'
&& typeof points[curX + ps] === 'number' && typeof points[curY + ps] === 'number') {
for (var x = (xStart += xStep); x < xEnd; x += xStep) {
result.push(x);
result.push(splines[j](x));
}
}
j++;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment