mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 17:51:24 +01:00
feat: burg groups - support styling
This commit is contained in:
parent
4185611791
commit
c86f7de9de
6 changed files with 146 additions and 127 deletions
|
|
@ -82,10 +82,11 @@ function openSubmapTool() {
|
|||
function rescaleBurgStyles(scale) {
|
||||
const burgIcons = [...byId("burgIcons").querySelectorAll("g")];
|
||||
for (const group of burgIcons) {
|
||||
const newRadius = rn(minmax(group.getAttribute("size") * scale, 0.2, 10), 2);
|
||||
changeRadius(newRadius, group.id);
|
||||
const strokeWidth = group.attributes["stroke-width"];
|
||||
strokeWidth.value = strokeWidth.value * scale;
|
||||
const newSize = rn(minmax(group.getAttribute("size") * scale, 0.2, 10), 2);
|
||||
group.setAttribute("font-size", newSize);
|
||||
|
||||
const newStroke = rn(group.getAttribute("stroke-width") * scale, 2);
|
||||
group.setAttribute("stroke-width", newStroke);
|
||||
}
|
||||
|
||||
const burgLabels = [...byId("burgLabels").querySelectorAll("g")];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue