This commit is contained in:
Azgaar 2020-12-30 14:06:00 +03:00
parent 16a89c6727
commit 89b2174084
3 changed files with 4 additions and 2 deletions

View file

@ -962,7 +962,7 @@ function drawGrid() {
TIME && console.time("drawGrid");
gridOverlay.selectAll("*").remove();
const type = styleGridType.value;
const size = Math.max(+styleGridSize.value, 2);
const size = Math.max(+styleGridSize.value || +gridOverlay.attr("size"), 2);
if (type === "pointyHex" || type === "flatHex") {
const points = getHexGridPoints(size, type);
const hex = "m" + getHex(size, type).slice(0, 4).join("l");