Update Path.js

fix getNearestPoint error on uninserted curves
; Conflicts:
;	src/path/Path.js
This commit is contained in:
Evgeniy Malyarov 2016-01-11 15:54:07 +05:00 committed by Jürg Lehni
parent fb76065242
commit add28666cf
2 changed files with 3 additions and 2 deletions

View file

@ -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;
}
/**

View file

@ -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;
},
/**