From 143d61e49b2d835de560aa6239889ebd0ccfac6e Mon Sep 17 00:00:00 2001
From: Catalin Mititiuc
Date: Thu, 11 Apr 2024 17:04:28 -0700
Subject: Position hexes with CSS; move map styles into separate file
---
src/index.js | 20 +++-----------------
1 file changed, 3 insertions(+), 17 deletions(-)
(limited to 'src/index.js')
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
--
cgit v1.2.3