mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-18 02:01:22 +01:00
v1.5.15 - svg save data cleansing
This commit is contained in:
parent
6987474c2e
commit
002160ed21
8 changed files with 164 additions and 135 deletions
|
|
@ -664,14 +664,9 @@ function fetchTextureURL(url) {
|
|||
img.src = url;
|
||||
}
|
||||
|
||||
function armiesStyle() {
|
||||
return `#armies text {stroke: none; fill: #fff; text-shadow: 0 0 4px #000; dominant-baseline: central; text-anchor: middle; font-family: Helvetica; fill-opacity: 1;}#armies text.regimentIcon {font-size: .8em;}`;
|
||||
}
|
||||
|
||||
// apply default or custom style settings on load
|
||||
function applyStyleOnLoad() {
|
||||
addDefaulsStyles(); // add FMG system styles to localStorage
|
||||
svg.select("defs").append("style").text(armiesStyle()); // add armies style
|
||||
|
||||
const preset = localStorage.getItem("presetStyle");
|
||||
const style = preset ? localStorage.getItem(preset) : null;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue