Define Item#sendToBack() and #bringToFront().

This commit is contained in:
Jürg Lehni 2013-01-20 17:08:49 -08:00
parent e4d98f7865
commit 8bab10cb5f

View file

@ -1290,6 +1290,20 @@ var Item = this.Item = Base.extend(Callback, /** @lends Item# */{
return item._parent.insertChild(index, this, _cloning);
},
/**
* Sends this item to the back of all other items within the same parent.
*/
sendToBack: function() {
return this._parent.insertChild(0, this);
},
/**
* Brings this item to the front of all other items within the same parent.
*/
bringToFront: function() {
return this._parent.addChild(this);
},
/**
* Inserts the specified item as a child of this item by appending it to
* the list of children and moving it above all other children. You can