mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-22 07:19:57 -05:00
Fix a bug in Path#join.
This commit is contained in:
parent
5770ebc9ff
commit
c10aa01de0
1 changed files with 2 additions and 1 deletions
|
@ -564,9 +564,10 @@ var Path = this.Path = PathItem.extend({
|
||||||
var first1 = this.getFirstSegment();
|
var first1 = this.getFirstSegment();
|
||||||
if (first1._point.equals(first2._point))
|
if (first1._point.equals(first2._point))
|
||||||
path.reverse();
|
path.reverse();
|
||||||
|
last2 = path.getLastSegment();
|
||||||
if (first1._point.equals(last2._point)) {
|
if (first1._point.equals(last2._point)) {
|
||||||
first1.setHandleIn(last2._handleIn);
|
first1.setHandleIn(last2._handleIn);
|
||||||
// Prepend all segments from path except last one
|
// Prepend all segments from path except the last one
|
||||||
this._add(segments.slice(0, segments.length - 1), 0);
|
this._add(segments.slice(0, segments.length - 1), 0);
|
||||||
} else {
|
} else {
|
||||||
this._add(segments.slice(0));
|
this._add(segments.slice(0));
|
||||||
|
|
Loading…
Reference in a new issue