mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-19 10:31:24 +01:00
refactor(styles): update burg styles for presets
This commit is contained in:
parent
4a08f617bb
commit
c16d292304
18 changed files with 230 additions and 1785 deletions
|
|
@ -53,10 +53,8 @@ function drawBurgIcon(burg) {
|
|||
}
|
||||
|
||||
function createIconGroups() {
|
||||
const defaultIconStyle = style.burgIcons.town || Object.values(style.burgIcons)[0];
|
||||
const defaultAnchorStyle = style.anchors.town || Object.values(style.anchors)[0];
|
||||
|
||||
// save existing styles and remove all groups
|
||||
const defaultIconStyle = style.burgIcons.town || Object.values(style.burgIcons)[0];
|
||||
document.querySelectorAll("g#burgIcons > g").forEach(group => {
|
||||
const groupStyle = Object.keys(defaultIconStyle).reduce((acc, key) => {
|
||||
acc[key] = group.getAttribute(key);
|
||||
|
|
@ -66,6 +64,7 @@ function createIconGroups() {
|
|||
group.remove();
|
||||
});
|
||||
|
||||
const defaultAnchorStyle = style.anchors.town || Object.values(style.anchors)[0];
|
||||
document.querySelectorAll("g#anchors > g").forEach(group => {
|
||||
const groupStyle = Object.keys(defaultAnchorStyle).reduce((acc, key) => {
|
||||
acc[key] = group.getAttribute(key);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue