Fix default value for end in Path#removeSegments(), so the last segment gets removed too.

This commit is contained in:
Jürg Lehni 2011-06-13 19:00:39 +01:00
parent e23ac6809b
commit 064f17eaec

View file

@ -526,7 +526,7 @@ var Path = this.Path = PathItem.extend({
*/
removeSegments: function(from, to) {
from = from || 0;
to = Base.pick(to, this._segments.length - 1);
to = Base.pick(to, this._segments.length);
var segments = this._segments,
curves = this._curves,
last = to >= segments.length,