mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 09:41:24 +01:00
Placed labels use most recent label group (#673)
This commit is contained in:
parent
965bfc7246
commit
9116d03e76
1 changed files with 4 additions and 1 deletions
|
|
@ -469,7 +469,10 @@ function addLabelOnClick() {
|
||||||
const name = Names.getCulture(culture);
|
const name = Names.getCulture(culture);
|
||||||
const id = getNextId("label");
|
const id = getNextId("label");
|
||||||
|
|
||||||
let group = labels.select("#addedLabels");
|
// use most recently selected label group
|
||||||
|
let selected = labelGroupSelect.value;
|
||||||
|
const symbol = selected ? "#" + selected : "#addedLabels";
|
||||||
|
let group = labels.select(symbol);
|
||||||
if (!group.size())
|
if (!group.size())
|
||||||
group = labels
|
group = labels
|
||||||
.append("g")
|
.append("g")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue