feat: burg groups - render anchors

This commit is contained in:
Azgaar 2025-03-27 00:57:35 +01:00
parent 5ed31dd8bf
commit bd05453e63
6 changed files with 139 additions and 49 deletions

View file

@ -77,11 +77,17 @@ function applyStyle(styleJSON) {
const group = selector.replace("#burgLabels > g#", "");
style.burgLabels[group] = styleJSON[selector];
}
if (selector.startsWith("#burgIcons")) {
const group = selector.replace("#burgIcons > g#", "");
style.burgIcons[group] = styleJSON[selector];
}
if (selector.startsWith("#anchors")) {
const group = selector.replace("#anchors > g#", "");
style.anchors[group] = styleJSON[selector];
}
const el = document.querySelector(selector);
if (!el) continue;

View file

@ -284,7 +284,7 @@ function selectStyleElement() {
}
}
if (styleElement == "burgIcons") {
if (styleElement === "burgIcons") {
styleBurgIcons.style.display = "block";
styleBurgIconsIcon.value = el.attr("data-icon");
styleBurgIconsIconSize.value = el.attr("font-size");
@ -302,13 +302,15 @@ function selectStyleElement() {
styleStrokeLinecapInput.value = el.attr("stroke-linecap") || "inherit";
}
if (styleElement == "anchors") {
if (styleElement === "anchors") {
styleFill.style.display = "block";
styleStroke.style.display = "block";
styleStrokeWidth.style.display = "block";
styleSize.style.display = "block";
styleFillInput.value = styleFillOutput.value = el.attr("fill") || "#ffffff";
styleStrokeInput.value = styleStrokeOutput.value = el.attr("stroke") || "#3e3e4b";
styleStrokeWidthInput.value = el.attr("stroke-width") || 0.24;
styleFontSize.value = el.attr("font-size") || 1;
}
if (styleElement === "legend") {