This commit is contained in:
Azgaar 2020-12-30 14:06:00 +03:00
parent bc54c01fce
commit 895f2a28a8
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");