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

removeAllTiles function doesn't remove all tiles #30

Description

@sacplex

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();

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions