From 89b217408413a0609f2f99f6bd92ed1ec24fd197 Mon Sep 17 00:00:00 2001 From: Azgaar Date: Wed, 30 Dec 2020 14:06:00 +0300 Subject: [PATCH] v1.4.64 --- modules/ui/layers.js | 2 +- modules/ui/options.js | 2 ++ modules/ui/style.js | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/ui/layers.js b/modules/ui/layers.js index f91d7b25..6f66e108 100644 --- a/modules/ui/layers.js +++ b/modules/ui/layers.js @@ -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"); diff --git a/modules/ui/options.js b/modules/ui/options.js index 4abe22ea..74022100 100644 --- a/modules/ui/options.js +++ b/modules/ui/options.js @@ -158,6 +158,8 @@ function changeMapSize() { landmass.select("rect").attr("x", 0).attr("y", 0).attr("width", maxWidth).attr("height", maxHeight); oceanPattern.select("rect").attr("x", 0).attr("y", 0).attr("width", maxWidth).attr("height", maxHeight); oceanLayers.select("rect").attr("x", 0).attr("y", 0).attr("width", maxWidth).attr("height", maxHeight); + fogging.selectAll("rect").attr("x", 0).attr("y", 0).attr("width", maxWidth).attr("height", maxHeight); + defs.select("mask#fog > rect").attr("width", maxWidth).attr("height", maxHeight); fitScaleBar(); if (window.fitLegendBox) fitLegendBox(); diff --git a/modules/ui/style.js b/modules/ui/style.js index e02393a7..db3b1db8 100644 --- a/modules/ui/style.js +++ b/modules/ui/style.js @@ -721,7 +721,7 @@ function applyDefaultStyle() { provinceBorders.attr("opacity", .8).attr("stroke", "#56566d").attr("stroke-width", .2).attr("stroke-dasharray", "1").attr("stroke-linecap", "butt").attr("filter", null); cells.attr("opacity", null).attr("stroke", "#808080").attr("stroke-width", .1).attr("filter", null).attr("mask", null); - gridOverlay.attr("opacity", .8).attr("type", "pointyHex").attr("size", 10).attr("stroke", "#808080").attr("stroke-width", .5).attr("stroke-dasharray", null).attr("transform", null).attr("filter", null).attr("mask", null); + gridOverlay.attr("opacity", .8).attr("type", "pointyHex").attr("size", 20).attr("stroke", "#808080").attr("stroke-width", .5).attr("stroke-dasharray", null).attr("transform", null).attr("filter", null).attr("mask", null); coordinates.attr("opacity", 1).attr("data-size", 12).attr("font-size", 12).attr("stroke", "#d4d4d4").attr("stroke-width", 1).attr("stroke-dasharray", 5).attr("filter", null).attr("mask", null); compass.attr("opacity", .8).attr("transform", null).attr("filter", null).attr("mask", "url(#water)").attr("shape-rendering", "optimizespeed"); if (!d3.select("#initial").size()) d3.select("#rose").attr("transform", "translate(80 80) scale(.25)");