Web Dev Solutions

Catalin Mititiuc

From bdeddc71eb64c60e8a6db64cb401b6e3a5f5571a Mon Sep 17 00:00:00 2001 From: Catalin Mititiuc Date: Wed, 24 Apr 2024 15:08:07 -0700 Subject: Remove references to 'container' in counter.js; fix dblclick not working right --- src/index.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/index.js') diff --git a/src/index.js b/src/index.js index 89893b6..b4216be 100644 --- a/src/index.js +++ b/src/index.js @@ -121,7 +121,8 @@ window.addEventListener('load', () => { game.unSelect(); RecordSheet.unSelect(); } else { - game.select(el.dataset.troopAllegiance, el.dataset.troopNumber); + const { troopAllegiance: allegiance, troopNumber: number } = el.dataset; + game.select({ dataset: { allegiance, number }}); } }) ); @@ -156,7 +157,8 @@ window.addEventListener('load', () => { .forEach(el => el.classList.remove('movement-ended')); game.endTurn(allegiance); - game.select(records.at(0).dataset.troopAllegiance, records.at(0).dataset.troopNumber); + const { troopAllegiance, troopNumber } = records.at(0).dataset; + game.select({ dataset: { allegiance: troopAllegiance, number: troopNumber }}); }) ); -- cgit v1.2.3