mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-07-29 07:09:45 -04:00
Simplify CurveLocation#getPoint(), as missing parameter cannot be determined if point is also undefined.
This commit is contained in:
parent
17bdaf6fe4
commit
30e92c8a35
1 changed files with 2 additions and 5 deletions
|
@ -146,11 +146,8 @@ CurveLocation = Base.extend(/** @lends CurveLocation# */{
|
||||||
* @bean
|
* @bean
|
||||||
*/
|
*/
|
||||||
getPoint: function() {
|
getPoint: function() {
|
||||||
if (!this._point && this._curve) {
|
if (!this._point && this._curve && this._parameter != null)
|
||||||
var parameter = this.getParameter();
|
this._point = this._curve.getPoint(this._parameter);
|
||||||
if (parameter != null)
|
|
||||||
this._point = this._curve.getPoint(parameter);
|
|
||||||
}
|
|
||||||
return this._point;
|
return this._point;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue