mirror of
https://github.com/photonstorm/phaser
synced 2024-11-10 23:24:41 +00:00
commit
b3d08ea535
1 changed files with 3 additions and 9 deletions
|
@ -449,7 +449,7 @@ Phaser.Group.prototype.previous = function () {
|
|||
|
||||
/**
|
||||
* Swaps the position of two children in this Group. Both children must be in this Group.
|
||||
* You cannot swap a child with itself, or swap un-parented children, doing so will return false.
|
||||
* You cannot swap a child with itself, or swap un-parented children.
|
||||
*
|
||||
* @method Phaser.Group#swap
|
||||
* @param {*} child1 - The first child to swap.
|
||||
|
@ -457,14 +457,8 @@ Phaser.Group.prototype.previous = function () {
|
|||
*/
|
||||
Phaser.Group.prototype.swap = function (child1, child2) {
|
||||
|
||||
var result = this.swapChildren(child1, child2);
|
||||
|
||||
if (result)
|
||||
{
|
||||
this.updateZ();
|
||||
}
|
||||
|
||||
return result;
|
||||
this.swapChildren(child1, child2);
|
||||
this.updateZ();
|
||||
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue