early-out for self-swap
This commit is contained in:
parent
6a40554309
commit
99bf7d62f1
1 changed files with 4 additions and 0 deletions
|
@ -214,6 +214,10 @@ PIXI.DisplayObjectContainer.prototype.addChildAt = function(child, index)
|
|||
*/
|
||||
PIXI.DisplayObjectContainer.prototype.swapChildren = function(child, child2)
|
||||
{
|
||||
if (child === child2) {
|
||||
return;
|
||||
}
|
||||
|
||||
var index1 = this.children.indexOf(child);
|
||||
var index2 = this.children.indexOf(child2);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue