From c148f4a4f329decec4602a48a8a71a62b429bfb4 Mon Sep 17 00:00:00 2001
From: Catalin Mititiuc
Date: Thu, 27 Jun 2024 12:48:06 -0700
Subject: WIP: render radial coord hexes/maps
---
src/index.js | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
(limited to 'src/index.js')
diff --git a/src/index.js b/src/index.js
index 6b7e930..6e98028 100644
--- a/src/index.js
+++ b/src/index.js
@@ -18,7 +18,8 @@ const mapPlaceholder = document.querySelector('.map-placeholder'),
distanceOutput = document.getElementById('status'),
proneToggle = document.getElementById('toggle-prone-counter'),
contentVisToggleEl = document.querySelector('#content input[type="checkbox"].visible'),
- fileName = localStorage.getItem('map') || 'scenario-side_show',
+ // fileName = localStorage.getItem('map') || 'scenario-side_show',
+ fileName = localStorage.getItem('map') || 'radial',
map = scenarios[fileName]?.hashed || `assets/images/${fileName}.svg`,
fileInputEl = document.querySelector('input[type="file"]'),
dice = document.querySelectorAll('.die'),
@@ -64,6 +65,7 @@ async function buildScenario(req) {
panzoom.start(svg);
gameboard.start(svg);
+
recordSheet.start(svg.querySelector('.start-locations'), gameboard.getUnits());
}
@@ -206,6 +208,14 @@ document.querySelector('#roll-dice').addEventListener('click', () => {
});
});
+// document.querySelectorAll('[name="select-elevation"]').forEach(el => {
+// const gameboard = document.querySelector('.gameboard');
+
+// el.addEventListener('change', function (e) {
+// gameboard.dataset.viewElevation = this.value
+// });
+// });
+
contentVisToggleEl.addEventListener('input', toggleContentVis);
contentVisToggleEl.checked = (localStorage.getItem('content-visibility') !== 'false');
toggleContentVis();
--
cgit v1.2.3