fix: home country always purple regardless of visited status

This commit is contained in:
haerikimmm
2026-06-16 19:43:54 +09:00
parent 665472b281
commit b518016a21

View File

@@ -64,15 +64,15 @@
function countryColor(d, sel, homeCode) {
const id = effId(d);
if (!sel.has(id)) return UNVISITED_COLOR;
if (id === homeCode) return HOME_COLOR;
if (!sel.has(id)) return UNVISITED_COLOR;
return VISITED_COLOR;
}
function countryHoverColor(d, sel, homeCode) {
const id = effId(d);
if (!sel.has(id)) return UNVISITED_COLOR_HOVER;
if (id === homeCode) return HOME_COLOR_HOVER;
if (!sel.has(id)) return UNVISITED_COLOR_HOVER;
return VISITED_COLOR_HOVER;
}