Make sure Segment#getLocation() always determines the right value for CurveLocation#parameter

Half the solution for #437.
This commit is contained in:
Jürg Lehni 2014-03-30 14:16:03 +02:00
parent 0f5e74a08e
commit c464f9ce1b

View file

@ -401,10 +401,10 @@ var Segment = Base.extend(/** @lends Segment# */{
*/ */
getLocation: function() { getLocation: function() {
var curve = this.getCurve(); var curve = this.getCurve();
// Determine whether the parameter for this segment is 0 or 1 based on return curve
// whether there is a next curve or not, as #getNext() takes closed into // Determine whether the parameter for this segment is 0 or 1.
// account and all. ? new CurveLocation(curve, this === curve._segment1 ? 0 : 1)
return curve ? new CurveLocation(curve, curve.getNext() ? 0 : 1) : null; : null;
}, },
/** /**