Position hexes with CSS; move map styles into separate file

This commit is contained in:
2025-06-16 22:41:28 -07:00
parent f42ad7c7be
commit a0c2640bb7
4 changed files with 261 additions and 1875 deletions

View File

@@ -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);
}
}
});