From ccb1cb2c7573364732a277f0c7c770de611aeca3 Mon Sep 17 00:00:00 2001
From: Catalin Mititiuc
Date: Wed, 10 Jul 2024 22:41:28 -0700
Subject: Allow generic maps to be still generated
---
src/radial.js | 13 +++++++++++++
1 file changed, 13 insertions(+)
(limited to 'src/radial.js')
diff --git a/src/radial.js b/src/radial.js
index f2ed5fb..c0fbdd6 100644
--- a/src/radial.js
+++ b/src/radial.js
@@ -646,3 +646,16 @@ function addGroup(container, className) {
container.appendChild(g);
return g;
}
+
+const { left, right, top, bottom } = document.currentScript.dataset;
+
+if (left && right && top && bottom) {
+ const map = generateRadialCoords(
+ new Map(),
+ { q: 0, r: 0, s: 0 },
+ { left: +left, top: +top, right: +right, bottom: +bottom },
+ 'both'
+ );
+
+ drawHexes(addGroup(grid, 'elevation-0'), map);
+}
--
cgit v1.2.3