fix: home country always purple regardless of visited status
This commit is contained in:
@@ -64,15 +64,15 @@
|
|||||||
|
|
||||||
function countryColor(d, sel, homeCode) {
|
function countryColor(d, sel, homeCode) {
|
||||||
const id = effId(d);
|
const id = effId(d);
|
||||||
if (!sel.has(id)) return UNVISITED_COLOR;
|
|
||||||
if (id === homeCode) return HOME_COLOR;
|
if (id === homeCode) return HOME_COLOR;
|
||||||
|
if (!sel.has(id)) return UNVISITED_COLOR;
|
||||||
return VISITED_COLOR;
|
return VISITED_COLOR;
|
||||||
}
|
}
|
||||||
|
|
||||||
function countryHoverColor(d, sel, homeCode) {
|
function countryHoverColor(d, sel, homeCode) {
|
||||||
const id = effId(d);
|
const id = effId(d);
|
||||||
if (!sel.has(id)) return UNVISITED_COLOR_HOVER;
|
|
||||||
if (id === homeCode) return HOME_COLOR_HOVER;
|
if (id === homeCode) return HOME_COLOR_HOVER;
|
||||||
|
if (!sel.has(id)) return UNVISITED_COLOR_HOVER;
|
||||||
return VISITED_COLOR_HOVER;
|
return VISITED_COLOR_HOVER;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user