mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-19 06:00:56 -05:00
Define Item#sendToBack() and #bringToFront().
This commit is contained in:
parent
e4d98f7865
commit
8bab10cb5f
1 changed files with 14 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue