mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-01 10:48:38 -05:00
Nullify path parent when removed.
This commit is contained in:
parent
783244b393
commit
e2c77a866d
1 changed files with 1 additions and 1 deletions
|
@ -5,7 +5,6 @@ Item = Base.extend({
|
||||||
this.parent.children.push(this);
|
this.parent.children.push(this);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* When passed a document, copies the item to the document,
|
* When passed a document, copies the item to the document,
|
||||||
* or duplicates it within the same document. When passed an item,
|
* or duplicates it within the same document. When passed an item,
|
||||||
|
@ -185,6 +184,7 @@ Item = Base.extend({
|
||||||
removeFromParent: function() {
|
removeFromParent: function() {
|
||||||
if(this.parent)
|
if(this.parent)
|
||||||
this.parent.children.splice(this.index, 1);
|
this.parent.children.splice(this.index, 1);
|
||||||
|
this.parent = null;
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue