von-grid
von-grid copied to clipboard
removeAllTiles function doesn't remove all tiles
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();