mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 17:51:24 +01:00
refactor: split states and burgs generators
This commit is contained in:
parent
e53c3a7773
commit
d7d79ad740
18 changed files with 445 additions and 358 deletions
|
|
@ -280,16 +280,6 @@ function addStylePreset() {
|
|||
"font-size",
|
||||
"font-family"
|
||||
],
|
||||
"#burgIcons > #cities": [
|
||||
"opacity",
|
||||
"fill",
|
||||
"fill-opacity",
|
||||
"size",
|
||||
"stroke",
|
||||
"stroke-width",
|
||||
"stroke-dasharray",
|
||||
"stroke-linecap"
|
||||
],
|
||||
"#anchors > #cities": ["opacity", "fill", "size", "stroke", "stroke-width"],
|
||||
"#burgLabels > #towns": [
|
||||
"opacity",
|
||||
|
|
@ -300,16 +290,6 @@ function addStylePreset() {
|
|||
"font-size",
|
||||
"font-family"
|
||||
],
|
||||
"#burgIcons > #towns": [
|
||||
"opacity",
|
||||
"fill",
|
||||
"fill-opacity",
|
||||
"size",
|
||||
"stroke",
|
||||
"stroke-width",
|
||||
"stroke-dasharray",
|
||||
"stroke-linecap"
|
||||
],
|
||||
"#anchors > #towns": ["opacity", "fill", "size", "stroke", "stroke-width"],
|
||||
"#labels > #states": [
|
||||
"opacity",
|
||||
|
|
@ -352,6 +332,20 @@ function addStylePreset() {
|
|||
]
|
||||
};
|
||||
|
||||
const burgIconsAttributes = [
|
||||
"opacity",
|
||||
"fill",
|
||||
"fill-opacity",
|
||||
"size",
|
||||
"stroke",
|
||||
"stroke-width",
|
||||
"stroke-dasharray",
|
||||
"stroke-linecap"
|
||||
];
|
||||
options.burgs.groups.forEach(group => {
|
||||
attributes[`#burgIcons > g[data-name='${group}']`] = burgIconsAttributes;
|
||||
});
|
||||
|
||||
for (const selector in attributes) {
|
||||
const el = document.querySelector(selector);
|
||||
if (!el) continue;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue