mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-07-23 04:08:48 -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
|
||||
*/
|
||||
getPoint: function() {
|
||||
if (!this._point && this._curve) {
|
||||
var parameter = this.getParameter();
|
||||
if (parameter != null)
|
||||
this._point = this._curve.getPoint(parameter);
|
||||
}
|
||||
if (!this._point && this._curve && this._parameter != null)
|
||||
this._point = this._curve.getPoint(this._parameter);
|
||||
return this._point;
|
||||
},
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue