bot script now uses closures - I really shouldn't have to have
changed this in both places
This commit is contained in:
parent
f397af24cd
commit
3a9d2190ba
@ -156,13 +156,14 @@ function poptimal_svg(params) {
|
|||||||
|
|
||||||
params.patterns.map((p) => {
|
params.patterns.map((p) => {
|
||||||
const dots = dm.dots(1 / p.m, p.n, false);
|
const dots = dm.dots(1 / p.m, p.n, false);
|
||||||
|
const rfunc = dm.radius(p.f);
|
||||||
const dots_g = svg.append("g")
|
const dots_g = svg.append("g")
|
||||||
.attr("id", `dots${p.i}`);
|
.attr("id", `dots${p.i}`);
|
||||||
|
|
||||||
dots_g.selectAll("circle")
|
dots_g.selectAll("circle")
|
||||||
.data(dots)
|
.data(dots)
|
||||||
.join("circle")
|
.join("circle")
|
||||||
.attr("r", (d) => dm.radius(d, p.f, p.r))
|
.attr("r", (d) => rfunc(d, p.r))
|
||||||
.attr("fill", p.colour)
|
.attr("fill", p.colour)
|
||||||
.attr("cx", (d) => d.x)
|
.attr("cx", (d) => d.x)
|
||||||
.attr("cy", (d) => d.y);
|
.attr("cy", (d) => d.y);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user