mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-19 06:00:56 -05:00
parent
c90a7c9f38
commit
da22161d28
1 changed files with 7 additions and 2 deletions
|
@ -454,15 +454,20 @@ var Path = PathItem.extend(/** @lends Path# */{
|
|||
curve._path = this;
|
||||
curve._segment1 = segments[i];
|
||||
curve._segment2 = segments[i + 1] || segments[0];
|
||||
curve._changed();
|
||||
}
|
||||
// If it's the first segment, correct the last segment of closed
|
||||
// paths too:
|
||||
if (curve = curves[this._closed && from === 0 ? segments.length - 1
|
||||
: from - 1])
|
||||
: from - 1]) {
|
||||
curve._segment2 = segments[from] || segments[0];
|
||||
curve._changed();
|
||||
}
|
||||
// Fix the segment after the modified range, if it exists
|
||||
if (curve = curves[to])
|
||||
if (curve = curves[to]) {
|
||||
curve._segment1 = segments[to];
|
||||
curve._changed();
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue