Compare commits

..

3 Commits

3 changed files with 23 additions and 0 deletions

Binary file not shown.

View File

@@ -255,6 +255,28 @@ function drawMap(world) {
}
});
states.append("text")
.attr("x", d => projection(d3.geoCentroid(d))[0])
.attr("y", d => projection(d3.geoCentroid(d))[1] + parseFloat(getComputedStyle(document.getElementsByClassName('languageText')[0]).getPropertyValue('font-size')))
.attr("text-anchor", "middle")
.attr("font-size", "12px")
.attr("fill", "black")
.attr("class", "romanizationText")
.attr("id", function(d) {
if (stateOrDistrictOrLanguage(d) == "language") {
return d.properties.lang_code+"Romanization"
} else {
d3.select(this).remove()
}
})
.text(function(d) {
if (stateOrDistrictOrLanguage(d) == "language") {
return "(" + d.properties.lang_name + ")";
} else {
d3.select(this).remove() // Only add this attribute if the element is a language
}
});
let allLangs = []
const coordinates = [77.69916967457782,23.389970772934166];

View File

@@ -1,4 +1,5 @@
1. REFACTOR
2. Show language names as well
3. Figure out positioning of the different translations, show all of them instead of having to hover
4. Show romanizations
5. General beautification