fix: regenerate burgs to re-render layers

This commit is contained in:
Azgaar 2024-09-13 14:02:16 +02:00
parent 50c6c56461
commit b142df8f0a
5 changed files with 8 additions and 2 deletions

View file

@ -3,6 +3,8 @@
function drawBurgIcons() {
TIME && console.time("drawBurgIcons");
icons.selectAll("circle, use").remove(); // cleanup
// capitals
const capitals = pack.burgs.filter(b => b.capital && !b.removed);
const capitalIcons = burgIcons.select("#cities");

View file

@ -3,6 +3,8 @@
function drawBurgLabels() {
TIME && console.time("drawBurgLabels");
burgLabels.selectAll("text").remove(); // cleanup
const capitals = pack.burgs.filter(b => b.capital && !b.removed);
const capitalSize = burgIcons.select("#cities").attr("size") || 1;
burgLabels