mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-03 19:45:44 -05:00
Fix clearing of removed segments.
This commit is contained in:
parent
a10e44d601
commit
f0038465cc
1 changed files with 2 additions and 3 deletions
|
@ -530,8 +530,7 @@ var Path = this.Path = PathItem.extend(/** @lends Path# */{
|
|||
* path.selected = true;
|
||||
*/
|
||||
removeSegment: function(index) {
|
||||
var segments = this.removeSegments(index, index + 1);
|
||||
return segments[0] || null;
|
||||
return this.removeSegments(index, index + 1)[0] || null;
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -579,7 +578,7 @@ var Path = this.Path = PathItem.extend(/** @lends Path# */{
|
|||
if (segment._selectionState)
|
||||
this._updateSelection(segment, segment._selectionState, 0);
|
||||
// Clear the indices and path references of the removed segments
|
||||
removed._index = removed._path = undefined;
|
||||
segment._index = segment._path = undefined;
|
||||
}
|
||||
// Adjust the indices of the segments above.
|
||||
for (var i = from, l = segments.length; i < l; i++)
|
||||
|
|
Loading…
Reference in a new issue