Move function into closure
This commit is contained in:
parent
48f239470f
commit
63376cb641
@ -12,10 +12,6 @@ function getGridIndex({ parentElement: { dataset: { x }, parentElement: { datase
|
||||
return { x: +x, y: +y };
|
||||
}
|
||||
|
||||
function getCounterAtGridIndex(x, y) {
|
||||
return getCell(x, y).querySelector('.counter');
|
||||
}
|
||||
|
||||
function getHex(cell) {
|
||||
return cell.querySelector('use[href="#hex"]');
|
||||
}
|
||||
@ -235,6 +231,10 @@ export default function (svg) {
|
||||
return svg.querySelector(`g[data-y="${y}"] > g[data-x="${x}"]`);
|
||||
}
|
||||
|
||||
function getCounterAtGridIndex(x, y) {
|
||||
return getCell(x, y).querySelector('.counter');
|
||||
}
|
||||
|
||||
function getSelected() {
|
||||
return svg.querySelector(`.counter.selected[data-allegiance][data-number]`);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user