mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-03 19:45:44 -05:00
Update Path.js
fix getNearestPoint error on uninserted curves ; Conflicts: ; src/path/Path.js
This commit is contained in:
parent
fb76065242
commit
add28666cf
2 changed files with 3 additions and 2 deletions
|
@ -1122,7 +1122,7 @@ statics: /** @lends Curve */{
|
|||
*/
|
||||
getNearestPoint: function(/* point */) {
|
||||
var loc = this.getNearestLocation.apply(this, arguments);
|
||||
return loc ? loc.getPoint() : loc;
|
||||
return loc ? loc.getPoint() : loc;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -374,7 +374,8 @@ var PathItem = Item.extend(/** @lends PathItem# */{
|
|||
* }
|
||||
*/
|
||||
getNearestPoint: function(/* point */) {
|
||||
return this.getNearestLocation.apply(this, arguments).getPoint();
|
||||
var loc = this.getNearestLocation.apply(this, arguments);
|
||||
return loc ? loc.getPoint() : loc;
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue