diff --git a/src/path/Curve.js b/src/path/Curve.js index a5d302a6..f132cfac 100644 --- a/src/path/Curve.js +++ b/src/path/Curve.js @@ -305,7 +305,7 @@ var Curve = this.Curve = Base.extend(/** @lends Curve# */{ return this._evaluate(parameter, 2); }, - getCrossingsFor: function(point, prevSlope) { + getCrossings: function(point, prevSlope) { // Implement the crossing number algorithm: // http://en.wikipedia.org/wiki/Point_in_polygon // Solve the y-axis cubic polynominal for point.y and count all diff --git a/src/path/Path.js b/src/path/Path.js index 3ba3a72b..2a12af56 100644 --- a/src/path/Path.js +++ b/src/path/Path.js @@ -1175,7 +1175,7 @@ var Path = this.Path = PathItem.extend(/** @lends Path# */{ crossings = 0; for (var i = 0, l = curves.length; i < l; i++) { var curve = curves[i]; - crossings += curve.getCrossingsFor(point, + crossings += curve.getCrossings(point, prevCurve.getTangent(1).y); prevCurve = curve; }