Create record sheet dynamically when map is loaded

This commit is contained in:
2024-04-30 10:17:45 -07:00
parent a4888a3e09
commit 82d3a4b415
14 changed files with 426 additions and 228 deletions

View File

@@ -13,8 +13,8 @@ const horzToVertDistRatio = 2 * Math.sqrt(3) / 3,
},
firingArcVisibility = {
davion: false,
liao: false
defender: false,
attacker: false
},
clippedFiringArcRadius = 25;

View File

@@ -29,6 +29,10 @@ function getCounterAndClones(svg, counter) {
return svg.querySelectorAll(`.counter${dataSelector(counter)}`);
}
export function getAllCounters(container) {
return container.querySelectorAll('g.counter[data-allegiance][data-number]');
}
export function getCounter(svg, selected) {
return svg.querySelector(`.counter${dataSelector(selected)}:not(.clone)`);
}