Two concurrent animations conflicts
nofatclips opened this issue · comments
When a second animation starts before the first one is over, the new one will intercept the "end animation" event triggered by the first one and stop abruptly in advance.
To reproduce the bug:
- Restart game
- Reveal cells until there are enough middle clickable cells
- Middle click two consecutive cells that cannot be freed
- When you click the first one, the number becomes red and starts rotating
- Same for the second one
- When the first one is back at the start position, the second one stops and turns black
- The first one stays red
There should be a way to detect which cell has finished animating.
Meh, I just forgot var
, so I actually had only one global listener all listeners acting on the same element.
Gotta use a LINTer.