diff --git a/src/path/Curve.js b/src/path/Curve.js index b6050361..19d66f6c 100644 --- a/src/path/Curve.js +++ b/src/path/Curve.js @@ -1593,10 +1593,10 @@ new function() { // Scope for intersection using bezier fat-line clipping for (var i = 1, l = part.length; i < l; i++) { var qx = part[i][0], qy = part[i][1]; - if (qy == threshold) { - return qx; - } else if (top ? qy > threshold : qy < threshold) - return px + (threshold - py) * (qx - px) / (qy - py); + if (top ? qy >= threshold : qy <= threshold) { + return qy === threshold ? qx + : px + (threshold - py) * (qx - px) / (qy - py); + } px = qx; py = qy; }