ruler style polyline color added

This commit is contained in:
Ángel Montero Lamas 2024-08-28 14:57:28 +02:00
parent 8b4dcec79d
commit f50b077f84
6 changed files with 93 additions and 93 deletions

View file

@ -257,9 +257,9 @@ async function parseLoadedData(data, mapVersion) {
if (data[4]) notes = JSON.parse(data[4]);
if (data[33]) rulers.fromString(data[33]);
const rulerPreferences = JSON.parse(data[33]);
localStorage.setItem("rulerInitialX", rulerPreferences.initialX);
localStorage.setItem("rulerInitialY", rulerPreferences.initialY);
localStorage.setItem("rulerInitialLength", rulerPreferences.initialLength);
localStorage.setItem("rulerWhiteLineColor", rulerPreferences.whiteColor);
localStorage.setItem("rulerGrayLineColor", rulerPreferences.grayColor);
if (data[34]) {
const usedFonts = JSON.parse(data[34]);
usedFonts.forEach(usedFont => {

View file

@ -74,9 +74,9 @@ function prepareMapData() {
const biomes = [biomesData.color, biomesData.habitability, biomesData.name].join("|");
const notesData = JSON.stringify(notes);
const rulerPreferences = JSON.stringify({
initialX: localStorage.getItem("rulerInitialX") || "50",
initialY: localStorage.getItem("rulerInitialY") || "50",
initialLength: localStorage.getItem("rulerInitialLength") || "100"
initialLength: localStorage.getItem("rulerInitialLength") || "100",
whiteColor: localStorage.getItem("rulerWhiteLineColor") || "#ffffff",
grayColor: localStorage.getItem("rulerGrayLineColor") || "#808080",
});
const rulersString = rulers.toString();
const fonts = JSON.stringify(getUsedFonts(svg.node()));