index : btroops | |
Virtual board game-aid for BattleTroops, an infantry combat simulator wargame published by FASA in 1989. |
aboutsummaryrefslogtreecommitdiff |
diff options
author | Catalin Mititiuc <Catalin.Mititiuc@gmail.com> | 2024-04-11 17:04:28 -0700 |
---|---|---|
committer | Catalin Mititiuc <Catalin.Mititiuc@gmail.com> | 2024-04-11 17:17:03 -0700 |
commit | 143d61e49b2d835de560aa6239889ebd0ccfac6e (patch) | |
tree | 1621484ff68ae84a3fb9feef8397201abf303512 /src/index.js | |
parent | b192fc0790a4815703afa6ccc782f2b573c64722 (diff) |
Position hexes with CSS; move map styles into separate file
Diffstat (limited to 'src/index.js')
-rw-r--r-- | src/index.js | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/src/index.js b/src/index.js index 66e554f..20a0623 100644 --- a/src/index.js +++ b/src/index.js @@ -704,9 +704,10 @@ window.addEventListener('load', () => { ptGrp.querySelectorAll(s).forEach(p => p.classList.add('active')); }; - } + }; - POINTS.forEach((row, index) => row.forEach(([x, y]) => { + // POINTS.forEach((row, index) => row.forEach(([x, y]) => { + [].forEach(() => row.forEach(([x, y]) => { let group = svg.querySelector(`g[data-x="${x}"][data-y="${y}"]`); let point = group.querySelector(`use[href="#point"]`); @@ -1100,19 +1101,4 @@ window.addEventListener('load', () => { } } }); - - function save(filename, data) { - const blob = new Blob([data], {type: 'text/csv'}); - if(window.navigator.msSaveOrOpenBlob) { - window.navigator.msSaveBlob(blob, filename); - } - else{ - const elem = window.document.createElement('a'); - elem.href = window.URL.createObjectURL(blob); - elem.download = filename; - document.body.appendChild(elem); - elem.click(); - document.body.removeChild(elem); - } - } });
\ No newline at end of file |