mirror of
https://github.com/AndrioCelos/TableturfBattleApp.git
synced 2026-08-22 02:44:01 -05:00
Fix test highlight persisting after removing the card
This commit is contained in:
@@ -502,6 +502,11 @@ function testPlacementListItem_pointerleave(button: HTMLButtonElement, placement
|
||||
testUndoButton.buttonElement.addEventListener('click', () => {
|
||||
const turn = testPlacements.pop();
|
||||
if (turn) {
|
||||
// Remove the highlight if needed.
|
||||
for (const p of turn.placementResults.placements[0].spacesAffected)
|
||||
board.setTestHighlight(p.space.x, p.space.y, false);
|
||||
|
||||
// Undo the placement.
|
||||
undoTurn(turn.placementResults);
|
||||
testPlacementList.removeChild(testPlacementList.firstChild!);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user