mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2024-12-29 09:22:22 -05:00
Merge pull request #1046 from sapics/fix-flatten
Add last curve segment point in path.flatten
This commit is contained in:
commit
4f0ae73cb4
1 changed files with 3 additions and 0 deletions
|
@ -1255,6 +1255,9 @@ var Path = PathItem.extend(/** @lends Path# */{
|
|||
for (var i = 0, l = parts.length; i < l; i++) {
|
||||
segments.push(new Segment(parts[i].curve.slice(0, 2)));
|
||||
}
|
||||
if (!this._closed && l) {
|
||||
segments.push(new Segment(parts[l - 1].curve.slice(6)));
|
||||
}
|
||||
this.setSegments(segments);
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in a new issue