Closed tobycheese closed 4 years ago
I believe, the background is cached in the state entity, and not in the tile item. Try changing that line to var obj = item;
:
Now, the question is why this is how it is. I'd suspect it is just a coincidence and most re-appearances of this piece of code could be changed in the way to use item
instead of entity
.
@akloeckner Yes, changing that line fixed the issue, thanks! Will this result in a fix eventually?
Makes sense to change that IMO.
Fix released in https://github.com/resoai/TileBoard/releases/tag/v2.0.2
I have a bunch of tiles that call the same script, as follows:
Clicking these launch the script with different variable values, this works as expected. However, both tiles show the same background image radioparadise.png. When changing the id of the second tile, the background is then respected (demoscene.png is shown for the second tile).