mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-20 22:39:50 -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,
|
// TODO: return groups if their children are all selected,
|
||||||
// and filter out their children from the list.
|
// and filter out their children from the list.
|
||||||
var items = [];
|
var items = [];
|
||||||
Base.each(items, function(item) {
|
Base.each(this._selectedItems, function(item) {
|
||||||
items.push(item);
|
items.push(item);
|
||||||
});
|
});
|
||||||
return items;
|
return items;
|
||||||
|
|
|
@ -417,7 +417,8 @@ var Path = this.Path = PathItem.extend({
|
||||||
this[name] = value;
|
this[name] = value;
|
||||||
}, []);
|
}, []);
|
||||||
} else {
|
} else {
|
||||||
this._segments.length = this._selectedSegmentCount = 0;
|
this.setSelected(false);
|
||||||
|
this._segments.length = 0;
|
||||||
}
|
}
|
||||||
for(var i = 0; i < length; i++) {
|
for(var i = 0; i < length; i++) {
|
||||||
this._add(Segment.read(segments, i, 1));
|
this._add(Segment.read(segments, i, 1));
|
||||||
|
|
Loading…
Reference in a new issue