Store language text instead of district text
This commit is contained in:
12
index.js
12
index.js
@@ -259,9 +259,15 @@ function drawMap(world) {
|
||||
.attr("text-anchor", "middle")
|
||||
.attr("font-size", "12px")
|
||||
.attr("fill", "black")
|
||||
.attr("class", "districtText")
|
||||
.attr("id", d => d.properties.district+"Text")
|
||||
.text(d => d.properties.district);
|
||||
.attr("class", "languageText")
|
||||
.attr("id", d => d.properties.lang_name+"Text")
|
||||
.text(function(d) {
|
||||
if (stateOrDistrictOrLanguage(d) == "language") {
|
||||
return d.properties.lang_name;
|
||||
} else {
|
||||
return d.properties.district;
|
||||
}
|
||||
});
|
||||
|
||||
let allLangs = []
|
||||
|
||||
|
Reference in New Issue
Block a user