mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-23 07:49:48 -05:00
Simplify Item#_removeFromParent().
This commit is contained in:
parent
4e059af684
commit
5593eb94d0
1 changed files with 3 additions and 5 deletions
|
@ -294,11 +294,9 @@ var Item = this.Item = Base.extend({
|
||||||
*/
|
*/
|
||||||
_removeFromParent: function() {
|
_removeFromParent: function() {
|
||||||
if (this._parent) {
|
if (this._parent) {
|
||||||
var ok = !!Base.splice(this._parent._children, null,
|
var res = Base.splice(this._parent._children, null, this._index, 1);
|
||||||
this._index, 1).length;
|
this._parent = this._index = null;
|
||||||
this._parent = null;
|
return !!res.length;
|
||||||
this._index = null;
|
|
||||||
return ok;
|
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue