mirror of
https://github.com/photonstorm/phaser
synced 2024-11-23 13:13:43 +00:00
Merge pull request #4836 from Olliebrown/tilemap_remove_bug
Fix for bug related to Issue #4737
This commit is contained in:
commit
f36235319f
1 changed files with 7 additions and 0 deletions
|
@ -1564,6 +1564,13 @@ var Tilemap = new Class({
|
|||
if (index !== null)
|
||||
{
|
||||
SpliceOne(this.layers, index);
|
||||
for (var i = index; i < this.layers.length; i++)
|
||||
{
|
||||
if (this.layers[i].tilemapLayer)
|
||||
{
|
||||
this.layers[i].tilemapLayer.layerIndex--;
|
||||
}
|
||||
}
|
||||
|
||||
if (this.currentLayerIndex === index)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue