mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-03-13 16:33:28 -04:00
Allow #removeSegments() to be called without arguments, in which case all segments are removed.
This commit is contained in:
parent
ea510c2403
commit
121ec5a93f
1 changed files with 4 additions and 2 deletions
|
@ -116,8 +116,10 @@ var Path = this.Path = PathItem.extend({
|
|||
|
||||
// TODO: Port back to Sg
|
||||
removeSegments: function(from, to) {
|
||||
for(var i = to; i >= from; i--)
|
||||
this.removeSegment(i);
|
||||
var i = Base.pick(to, this._segments.length),
|
||||
from = from || 0;
|
||||
while (i >= from)
|
||||
this.removeSegment(i--);
|
||||
},
|
||||
|
||||
isSelected: function() {
|
||||
|
|
Loading…
Reference in a new issue