From 3a9d2190ba47ef4871b2293b3249143c319c6699 Mon Sep 17 00:00:00 2001 From: Mike Lynch Date: Sun, 20 Apr 2025 15:29:55 +1000 Subject: [PATCH] bot script now uses closures - I really shouldn't have to have changed this in both places --- poptimal.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/poptimal.js b/poptimal.js index 44b3dbf..dc0cb69 100644 --- a/poptimal.js +++ b/poptimal.js @@ -156,13 +156,14 @@ function poptimal_svg(params) { params.patterns.map((p) => { const dots = dm.dots(1 / p.m, p.n, false); + const rfunc = dm.radius(p.f); const dots_g = svg.append("g") .attr("id", `dots${p.i}`); dots_g.selectAll("circle") .data(dots) .join("circle") - .attr("r", (d) => dm.radius(d, p.f, p.r)) + .attr("r", (d) => rfunc(d, p.r)) .attr("fill", p.colour) .attr("cx", (d) => d.x) .attr("cy", (d) => d.y);