mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 17:51:24 +01:00
feat: burg group editor - text-shadow
This commit is contained in:
parent
b700bf0630
commit
1125192b72
14 changed files with 60 additions and 90 deletions
|
|
@ -467,12 +467,6 @@ export function resolveVersionConflicts(mapVersion) {
|
|||
if (oceanPattern) oceanPattern.removeAttribute("opacity");
|
||||
const oceanicPattern = document.getElementById("oceanicPattern");
|
||||
if (!oceanicPattern.getAttribute("opacity")) oceanicPattern.setAttribute("opacity", 0.2);
|
||||
|
||||
// v 1.63 moved label text-shadow from css to editable inline style
|
||||
burgLabels.select("#cities").style("text-shadow", "white 0 0 4px");
|
||||
burgLabels.select("#towns").style("text-shadow", "white 0 0 4px");
|
||||
labels.select("#states").style("text-shadow", "white 0 0 4px");
|
||||
labels.select("#addedLabels").style("text-shadow", "white 0 0 4px");
|
||||
}
|
||||
|
||||
if (isOlderThan("1.64.0")) {
|
||||
|
|
|
|||
|
|
@ -93,11 +93,7 @@ function applyStyle(styleJSON) {
|
|||
continue;
|
||||
}
|
||||
|
||||
if (attribute === "text-shadow") {
|
||||
el.style[attribute] = value;
|
||||
} else {
|
||||
el.setAttribute(attribute, value);
|
||||
}
|
||||
el.setAttribute(attribute, value);
|
||||
|
||||
if (selector === "#texture") {
|
||||
const image = document.querySelector("#texture > image");
|
||||
|
|
@ -280,32 +276,12 @@ function addStylePreset() {
|
|||
"data-columns"
|
||||
],
|
||||
"#legendBox": ["fill", "fill-opacity"],
|
||||
"#burgLabels > #cities": [
|
||||
"opacity",
|
||||
"fill",
|
||||
"text-shadow",
|
||||
"letter-spacing",
|
||||
"data-size",
|
||||
"font-size",
|
||||
"font-family"
|
||||
],
|
||||
"#anchors > #cities": ["opacity", "fill", "size", "stroke", "stroke-width"],
|
||||
"#burgLabels > #towns": [
|
||||
"opacity",
|
||||
"fill",
|
||||
"text-shadow",
|
||||
"letter-spacing",
|
||||
"data-size",
|
||||
"font-size",
|
||||
"font-family"
|
||||
],
|
||||
"#anchors > #towns": ["opacity", "fill", "size", "stroke", "stroke-width"],
|
||||
"#labels > #states": [
|
||||
"opacity",
|
||||
"fill",
|
||||
"stroke",
|
||||
"stroke-width",
|
||||
"text-shadow",
|
||||
"style",
|
||||
"letter-spacing",
|
||||
"data-size",
|
||||
"font-size",
|
||||
|
|
@ -317,7 +293,7 @@ function addStylePreset() {
|
|||
"fill",
|
||||
"stroke",
|
||||
"stroke-width",
|
||||
"text-shadow",
|
||||
"style",
|
||||
"letter-spacing",
|
||||
"data-size",
|
||||
"font-size",
|
||||
|
|
@ -354,14 +330,14 @@ function addStylePreset() {
|
|||
const burgLabelsAttributes = [
|
||||
"opacity",
|
||||
"fill",
|
||||
"text-shadow",
|
||||
"style",
|
||||
"letter-spacing",
|
||||
"data-size",
|
||||
"font-size",
|
||||
"font-family"
|
||||
];
|
||||
options.burgs.groups.forEach(({name}) => {
|
||||
attributes[`#burgIcons > g.${name}`] = burgIconsAttributes;
|
||||
attributes[`#burgIcons > g#${name}`] = burgIconsAttributes;
|
||||
attributes[`#burgLabels > g#${name}`] = burgLabelsAttributes;
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue