diff --git a/modules/ui/layers.js b/modules/ui/layers.js index a258b241..653cc9e4 100644 --- a/modules/ui/layers.js +++ b/modules/ui/layers.js @@ -471,16 +471,14 @@ function togglePrec(event) { function drawPrec() { prec.selectAll("circle").remove(); const {cells, points} = grid; + prec.style("display", "block"); const show = d3.transition().duration(800).ease(d3.easeSinIn); prec.selectAll("text").attr("opacity", 0).transition(show).attr("opacity", 1); - const cellsNumberModifier = pointsInput.dataset.cells / 10000; + const cellsNumberModifier = (pointsInput.dataset.cells / 10000) ** 0.25; const data = cells.i.filter(i => cells.h[i] >= 20 && cells.prec[i]); - const getRadius = prec => { - const base = prec / cellsNumberModifier / 2; - return rn(Math.sqrt(base), 2); - }; + const getRadius = prec => rn(Math.sqrt(prec / 4) / cellsNumberModifier, 2); prec .selectAll("circle") diff --git a/modules/ui/style.js b/modules/ui/style.js index bbaa6a93..b5a8f3b9 100644 --- a/modules/ui/style.js +++ b/modules/ui/style.js @@ -831,7 +831,7 @@ function applyDefaultStyle() { landmass.attr("opacity", 1).attr("fill", "#eef6fb").attr("filter", null); markers.attr("opacity", null).attr("rescale", 1).attr("filter", "url(#dropShadow01)"); - prec.attr("opacity", null).attr("stroke", "#000000").attr("stroke-width", 0.1).attr("fill", "#003dff").attr("filter", null); + prec.attr("opacity", null).attr("stroke", "#000000").attr("stroke-width", 0).attr("fill", "#003dff").attr("filter", null); population.attr("opacity", null).attr("stroke-width", 1.6).attr("stroke-dasharray", null).attr("stroke-linecap", "butt").attr("filter", null); population.select("#rural").attr("stroke", "#0000ff"); population.select("#urban").attr("stroke", "#ff0000");