Have Path#setSegments convert elements in the passed array to segments.

This commit is contained in:
Jonathan Puckey 2011-03-04 13:02:11 +01:00
parent bb5bfe1fb1
commit 3837ca1f14

View file

@ -24,7 +24,11 @@ var Path = PathItem.extend({
},
setSegments: function(segments) {
this._segments = segments;
var l = segments.length;
this._segments = new Array(l);
for(var i = 0; i < l; i++) {
this._segments[i] = Segment.read(segments, i, 1);
}
},
// TODO: Consider adding getSubPath(a, b), returning a part of the current