mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-07 13:22:07 -05:00
Fix two bugs in CurveLocation.
This commit is contained in:
parent
6bbfd55240
commit
08e779d560
1 changed files with 2 additions and 2 deletions
|
@ -33,7 +33,7 @@ CurveLocation = Base.extend({
|
||||||
this._segment = curve._segment1;
|
this._segment = curve._segment1;
|
||||||
} else if (parameter == 1) {
|
} else if (parameter == 1) {
|
||||||
this._segment = curve._segment2;
|
this._segment = curve._segment2;
|
||||||
} else if (parameter == -1) {
|
} else if (parameter == null) {
|
||||||
return null;
|
return null;
|
||||||
} else {
|
} else {
|
||||||
// Determine the closest segment by comparing curve lengths
|
// Determine the closest segment by comparing curve lengths
|
||||||
|
@ -93,7 +93,7 @@ CurveLocation = Base.extend({
|
||||||
*/
|
*/
|
||||||
getParameter: function() {
|
getParameter: function() {
|
||||||
if (this._parameter == null && this._point)
|
if (this._parameter == null && this._point)
|
||||||
this._parameter = this._curve.getParameter(point);
|
this._parameter = this._curve.getParameter(this._point);
|
||||||
return this._parameter;
|
return this._parameter;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue