Use correct segment index boundaries in Path#smooth().

This commit is contained in:
Jürg Lehni 2016-01-15 16:35:48 +01:00
parent 34dc0e1589
commit 6262863d9f

View file

@ -2080,7 +2080,7 @@ var Path = PathItem.extend(/** @lends Path# */{
// while ranges on open paths stay within the path's open range.
return Numerical.clamp(index < 0 && closed
? index % length
: index < 0 ? index + length : index, 0, length);
: index < 0 ? index + length : index, 0, length - 1);
}
var opts = options || {},