mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-03 19:45:44 -05:00
Have Path#setSegments convert elements in the passed array to segments.
This commit is contained in:
parent
bb5bfe1fb1
commit
3837ca1f14
1 changed files with 5 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue