mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-07 13:22:07 -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) {
|
function append(top) {
|
||||||
return function(item) {
|
return function(item) {
|
||||||
if (this.children && item._removeFromParent()) {
|
item._removeFromParent();
|
||||||
|
if (this.children) {
|
||||||
this.children.splice(top ? this.children.length : 0, 0, item);
|
this.children.splice(top ? this.children.length : 0, 0, item);
|
||||||
// TODO: Reassign _index
|
// TODO: Reassign _index
|
||||||
item.parent = this;
|
item.parent = this;
|
||||||
|
|
Loading…
Reference in a new issue