mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-05 20:32:00 -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;
|
* path.selected = true;
|
||||||
*/
|
*/
|
||||||
removeSegment: function(index) {
|
removeSegment: function(index) {
|
||||||
var segments = this.removeSegments(index, index + 1);
|
return this.removeSegments(index, index + 1)[0] || null;
|
||||||
return segments[0] || null;
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -579,7 +578,7 @@ var Path = this.Path = PathItem.extend(/** @lends Path# */{
|
||||||
if (segment._selectionState)
|
if (segment._selectionState)
|
||||||
this._updateSelection(segment, segment._selectionState, 0);
|
this._updateSelection(segment, segment._selectionState, 0);
|
||||||
// Clear the indices and path references of the removed segments
|
// 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.
|
// Adjust the indices of the segments above.
|
||||||
for (var i = from, l = segments.length; i < l; i++)
|
for (var i = from, l = segments.length; i < l; i++)
|
||||||
|
|
Loading…
Reference in a new issue