Skip to content
This repository has been archived by the owner on Jun 15, 2021. It is now read-only.

removeAllTiles function doesn't remove all tiles #30

Open
sacplex opened this issue Apr 3, 2021 · 0 comments
Open

removeAllTiles function doesn't remove all tiles #30

sacplex opened this issue Apr 3, 2021 · 0 comments

Comments

@sacplex
Copy link

sacplex commented Apr 3, 2021

Hi,

I found an issue when removing all the tiles, where only some of the tiles are been removed. I believe this is due to the element being shifted down by one. The index variable t is not shifting after each removal.

for (var e = this.tileGroup.children, t = 0; t < e.length; t++)
  this.tileGroup.remove(e[t]);

However, was able to fix with the following code,

var e = this.tileGroup.children
while(e.length>0)
  e.pop();
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant