mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 17:51:24 +01:00
feat: burg groups - image icons
This commit is contained in:
parent
c86f7de9de
commit
c29f3b73e8
9 changed files with 371 additions and 41 deletions
|
|
@ -10,6 +10,8 @@ function drawBurgLabels() {
|
|||
|
||||
const labelGroup = burgLabels.select("#" + name);
|
||||
if (labelGroup.empty()) continue;
|
||||
|
||||
const dx = labelGroup.attr("data-dx");
|
||||
const dy = labelGroup.attr("data-dy");
|
||||
|
||||
labelGroup
|
||||
|
|
@ -21,6 +23,7 @@ function drawBurgLabels() {
|
|||
.attr("data-id", d => d.i)
|
||||
.attr("x", d => d.x)
|
||||
.attr("y", d => d.y)
|
||||
.attr("dx", dx + "em")
|
||||
.attr("dy", dy + "em")
|
||||
.text(d => d.name);
|
||||
}
|
||||
|
|
@ -30,6 +33,7 @@ function drawBurgLabels() {
|
|||
|
||||
function drawBurgLabel(burg) {
|
||||
const group = burgLabels.select("#" + burg.group);
|
||||
const dx = labelGroup.attr("data-dx");
|
||||
const dy = labelGroup.attr("data-dy");
|
||||
|
||||
group
|
||||
|
|
@ -38,6 +42,7 @@ function drawBurgLabel(burg) {
|
|||
.attr("data-id", burg.i)
|
||||
.attr("x", burg.x)
|
||||
.attr("y", burg.y)
|
||||
.attr("dx", dx + "em")
|
||||
.attr("dy", dy + "em")
|
||||
.text(burg.name);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue