Simplify Item#_removeFromParent().

This commit is contained in:
Jürg Lehni 2011-05-14 18:11:31 +01:00
parent 4e059af684
commit 5593eb94d0

View file

@ -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;
}, },