From 08e779d5605185e8c6fb6cea4aca3f48d381a8f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Sun, 1 May 2011 13:16:25 +0100 Subject: [PATCH] Fix two bugs in CurveLocation. --- src/path/CurveLocation.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/path/CurveLocation.js b/src/path/CurveLocation.js index a3d672fc..80cc4b9e 100644 --- a/src/path/CurveLocation.js +++ b/src/path/CurveLocation.js @@ -33,7 +33,7 @@ CurveLocation = Base.extend({ this._segment = curve._segment1; } else if (parameter == 1) { this._segment = curve._segment2; - } else if (parameter == -1) { + } else if (parameter == null) { return null; } else { // Determine the closest segment by comparing curve lengths @@ -93,7 +93,7 @@ CurveLocation = Base.extend({ */ getParameter: function() { if (this._parameter == null && this._point) - this._parameter = this._curve.getParameter(point); + this._parameter = this._curve.getParameter(this._point); return this._parameter; },