mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-05 20:32:00 -05:00
Fix recently introduce error in append().
This commit is contained in:
parent
999fb129cc
commit
79f55aa908
1 changed files with 2 additions and 1 deletions
|
@ -810,7 +810,8 @@ var Item = this.Item = Base.extend({
|
|||
|
||||
function append(top) {
|
||||
return function(item) {
|
||||
if (this.children && item._removeFromParent()) {
|
||||
item._removeFromParent();
|
||||
if (this.children) {
|
||||
this.children.splice(top ? this.children.length : 0, 0, item);
|
||||
// TODO: Reassign _index
|
||||
item.parent = this;
|
||||
|
|
Loading…
Reference in a new issue