Web Dev Solutions

Catalin Mititiuc

From 7183511dbf4062535e676bd923856b213d565a52 Mon Sep 17 00:00:00 2001 From: Catalin Mititiuc Date: Sun, 28 Jul 2024 12:24:24 -0700 Subject: Remove prone toggle --- src/index.js | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) (limited to 'src/index.js') diff --git a/src/index.js b/src/index.js index a951084..fa90d13 100644 --- a/src/index.js +++ b/src/index.js @@ -16,7 +16,6 @@ if (window.IS_DEV) { const mapPlaceholder = document.querySelector('.map-placeholder'), distanceOutput = document.getElementById('status'), - proneToggle = document.getElementById('toggle-prone-counter'), contentVisToggleEl = document.querySelector('#edge-inputs input[type="checkbox"].visible'), fileName = localStorage.getItem('map') || 'scenario-side_show', map = scenarios[fileName]?.hashed || `assets/images/${fileName}.svg`, @@ -85,10 +84,10 @@ async function buildScenario(req) { // recordSheet.start(svg.querySelector('.start-locations'), gameboard.getUnits()); recordSheet.start(null, scenarioUnits); - //const [trooper] = gameboard.getUnits(); - //Observable.notify('select', trooper); - //gameboard.setCounter('prone'); - //gameboard.setCounter('1st-floor'); + const [trooper] = gameboard.getUnits(); + Observable.notify('select', trooper); + gameboard.setCounter('prone'); + gameboard.setCounter('1st-floor'); } function updateTurnCounter() { @@ -173,11 +172,6 @@ document.querySelectorAll('#toggle-firing-arc-vis input').forEach(el => el.addEventListener('input', gameboard.toggleFiringArcVisibility) ); -document.getElementById('toggle-prone-counter').addEventListener('input', function () { - const selected = recordSheet.getSelected(); - selected && gameboard.toggleProne(); -}); - document.querySelectorAll('.end-move').forEach(el => el.addEventListener('click', () => Observable.notify('endmove')) ); @@ -313,4 +307,3 @@ dice.forEach(el => { }); Observable.subscribe('distance', distance); -Observable.subscribe('proneflag', checked => proneToggle.checked = checked); -- cgit v1.2.3