mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-03 19:45:44 -05:00
Fix Document#getSelectedItems & Path#setSegments.
This commit is contained in:
parent
578269d0c1
commit
538f360a6b
2 changed files with 3 additions and 2 deletions
|
@ -62,7 +62,7 @@ var Document = this.Document = Base.extend({
|
|||
// TODO: return groups if their children are all selected,
|
||||
// and filter out their children from the list.
|
||||
var items = [];
|
||||
Base.each(items, function(item) {
|
||||
Base.each(this._selectedItems, function(item) {
|
||||
items.push(item);
|
||||
});
|
||||
return items;
|
||||
|
|
|
@ -417,7 +417,8 @@ var Path = this.Path = PathItem.extend({
|
|||
this[name] = value;
|
||||
}, []);
|
||||
} else {
|
||||
this._segments.length = this._selectedSegmentCount = 0;
|
||||
this.setSelected(false);
|
||||
this._segments.length = 0;
|
||||
}
|
||||
for(var i = 0; i < length; i++) {
|
||||
this._add(Segment.read(segments, i, 1));
|
||||
|
|
Loading…
Reference in a new issue