mirror of
https://github.com/photonstorm/phaser
synced 2025-02-17 06:28:30 +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)
|
if (index !== null)
|
||||||
{
|
{
|
||||||
SpliceOne(this.layers, index);
|
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)
|
if (this.currentLayerIndex === index)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue