diff --git a/index.css b/index.css
index 55e03f9a..4e58b8c7 100644
--- a/index.css
+++ b/index.css
@@ -734,7 +734,7 @@ input[type="color"]::-webkit-color-swatch-wrapper {
background-color: var(--header-active);
}
-#toolsContent div {
+#toolsContent > .grid {
display: grid;
grid-template-columns: repeat(4, 1fr);
margin: 0.2em 0;
@@ -2375,6 +2375,29 @@ svg.button {
background: #ccc;
}
+.separator {
+ display: flex;
+ align-items: center;
+ text-align: center;
+
+ font-style: italic;
+ font-weight: bold;
+ color: #222;
+ margin: 0.8em 0 0 0;
+}
+.separator::before,
+.separator::after {
+ content: "";
+ flex: 1;
+ border-bottom: 1px solid #333;
+}
+.separator:not(:empty)::before {
+ margin-right: 0.25em;
+}
+.separator:not(:empty)::after {
+ margin-left: 0.25em;
+}
+
@media print {
div,
canvas {
diff --git a/index.html b/index.html
index 11faecf1..23cbe985 100644
--- a/index.html
+++ b/index.html
@@ -380,7 +380,7 @@
-
Click to configure:
-
-
+
Edit
+
-
-
-
Click to overview:
-
- Charts
+ Heightmap
-
- Burgs
-
-
- Rivers
+
+ Markers
Military
-
- Markers
+
+ Namesbase
-
- Cells
+ Notes
+
+ Provinces
+
+ Religions
+
+
+ Rivers
+
+
+ States
+
+ Units
+ Zones
-
Click to regenerate:
-
+
Regenerate
+
+
+ Burgs
+
+ Cultures
+ Emblems
+ Ice
Labels
-
- Relief
+
+ Markers
- Routes
-
- Rivers
+
+ Military
Population
-
- States
-
- Burgs
+ Relief
- Emblems
Religions
- Cultures
-
- Military
+
+ Rivers
- Ice
-
- Markers
+ Routes
+
+ States
-
Click to add:
-
+
Add
+
Label
+
+ Marker
+
Route
+
+
+
Show
+
+
+ Cells
+
- Marker
+ Charts
-
Click to create a new map:
-
+
Create
+
@@ -7819,18 +7819,19 @@
-
-
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
@@ -8058,7 +8059,7 @@
-
+
@@ -8082,7 +8083,7 @@
-
+
@@ -8124,9 +8125,9 @@
-
+
-
+
diff --git a/main.js b/main.js
index b53a86dc..8900c18e 100644
--- a/main.js
+++ b/main.js
@@ -53,7 +53,7 @@ let biomes = viewbox.append("g").attr("id", "biomes");
let cells = viewbox.append("g").attr("id", "cells");
let gridOverlay = viewbox.append("g").attr("id", "gridOverlay");
let coordinates = viewbox.append("g").attr("id", "coordinates");
-let compass = viewbox.append("g").attr("id", "compass");
+let compass = viewbox.append("g").attr("id", "compass").style("display", "none");
let rivers = viewbox.append("g").attr("id", "rivers");
let terrain = viewbox.append("g").attr("id", "terrain");
let relig = viewbox.append("g").attr("id", "relig");
@@ -126,6 +126,9 @@ emblems.append("g").attr("id", "burgEmblems");
emblems.append("g").attr("id", "provinceEmblems");
emblems.append("g").attr("id", "stateEmblems");
+// compass
+compass.append("use").attr("xlink:href", "#defs-compass-rose");
+
// fogging
fogging.append("rect").attr("x", 0).attr("y", 0).attr("width", "100%").attr("height", "100%");
fogging
diff --git a/modules/dynamic/auto-update.js b/modules/dynamic/auto-update.js
index c864cec5..38ae4403 100644
--- a/modules/dynamic/auto-update.js
+++ b/modules/dynamic/auto-update.js
@@ -846,4 +846,16 @@ export function resolveVersionConflicts(version) {
}
});
}
+
+ if (version < 1.98) {
+ // v1.98.00 changed compass layer and rose element id
+ const rose = compass.select("use");
+ rose.attr("xlink:href", "#defs-compass-rose");
+
+ if (!compass.selectAll("*").size()) {
+ compass.style("display", "none");
+ compass.append("use").attr("xlink:href", "#defs-compass-rose");
+ shiftCompass();
+ }
+ }
}
diff --git a/modules/io/export.js b/modules/io/export.js
index c4742612..e860197c 100644
--- a/modules/io/export.js
+++ b/modules/io/export.js
@@ -295,7 +295,7 @@ async function getMapURL(type, options) {
// add wind rose
if (cloneEl.getElementById("compass")) {
- const rose = svgDefs.getElementById("rose");
+ const rose = svgDefs.getElementById("defs-compass-rose");
if (rose) cloneDefs.appendChild(rose.cloneNode(true));
}
diff --git a/modules/io/load.js b/modules/io/load.js
index ff6b2731..94cad90d 100644
--- a/modules/io/load.js
+++ b/modules/io/load.js
@@ -456,7 +456,7 @@ async function parseLoadedData(data, mapVersion) {
{
// dynamically import and run auto-update script
const versionNumber = parseFloat(params[0]);
- const {resolveVersionConflicts} = await import("../dynamic/auto-update.js?v=1.97.04");
+ const {resolveVersionConflicts} = await import("../dynamic/auto-update.js?v=1.98.00");
resolveVersionConflicts(versionNumber);
}
diff --git a/modules/ui/layers.js b/modules/ui/layers.js
index 9db58faa..d3b0e44d 100644
--- a/modules/ui/layers.js
+++ b/modules/ui/layers.js
@@ -1525,10 +1525,6 @@ function toggleCompass(event) {
if (!layerIsOn("toggleCompass")) {
turnButtonOn("toggleCompass");
$("#compass").fadeIn();
- if (!compass.selectAll("*").size()) {
- compass.append("use").attr("xlink:href", "#rose");
- shiftCompass();
- }
if (event && isCtrlClick(event)) editStyle("compass");
} else {
if (event && isCtrlClick(event)) {
diff --git a/modules/ui/stylePresets.js b/modules/ui/stylePresets.js
index aa13d800..adbf5c14 100644
--- a/modules/ui/stylePresets.js
+++ b/modules/ui/stylePresets.js
@@ -63,7 +63,7 @@ async function getStylePreset(desiredPreset) {
async function fetchSystemPreset(preset) {
try {
- const res = await fetch(`./styles/${preset}.json`);
+ const res = await fetch(`./styles/${preset}.json?v=${version}`);
return await res.json();
} catch (err) {
throw new Error("Cannot fetch style preset", preset);
@@ -198,7 +198,7 @@ function addStylePreset() {
"mask"
],
"#compass": ["opacity", "transform", "filter", "mask", "shape-rendering"],
- "#rose": ["transform"],
+ "#compass > use": ["transform"],
"#relig": ["opacity", "stroke", "stroke-width", "filter"],
"#cults": ["opacity", "stroke", "stroke-width", "stroke-dasharray", "stroke-linecap", "filter"],
"#landmass": ["opacity", "fill", "filter"],
diff --git a/styles/ancient.json b/styles/ancient.json
index 78cac9e1..17d210a5 100644
--- a/styles/ancient.json
+++ b/styles/ancient.json
@@ -72,8 +72,8 @@
"mask": "url(#water)",
"shape-rendering": "optimizespeed"
},
- "#rose": {
- "transform": "translate(80 80) scale(.25)"
+ "#compass > use": {
+ "transform": "translate(80 80) scale(0.25)"
},
"#relig": {
"opacity": 0.7,
diff --git a/styles/atlas.json b/styles/atlas.json
index 040e551c..d8936b65 100644
--- a/styles/atlas.json
+++ b/styles/atlas.json
@@ -72,7 +72,7 @@
"mask": "url(#water)",
"shape-rendering": "optimizespeed"
},
- "#rose": {
+ "#compass > use": {
"transform": "translate(80 80) scale(.25)"
},
"#relig": {
diff --git a/styles/clean.json b/styles/clean.json
index 6f2e7ac6..ba6fc3a5 100644
--- a/styles/clean.json
+++ b/styles/clean.json
@@ -73,8 +73,8 @@
"mask": "url(#water)",
"shape-rendering": "optimizespeed"
},
- "#rose": {
- "transform": null
+ "#compass > use": {
+ "transform": "translate(80 80) scale(.25)"
},
"#relig": {
"opacity": 0.7,
diff --git a/styles/cyberpunk.json b/styles/cyberpunk.json
index 7b8d64b6..152cd0cd 100644
--- a/styles/cyberpunk.json
+++ b/styles/cyberpunk.json
@@ -72,8 +72,8 @@
"mask": "",
"shape-rendering": "optimizespeed"
},
- "#rose": {
- "transform": null
+ "#compass > use": {
+ "transform": "translate(80 80) scale(.25)"
},
"#relig": {
"opacity": 0.5,
diff --git a/styles/default.json b/styles/default.json
index 7e6521ea..5cf061ba 100644
--- a/styles/default.json
+++ b/styles/default.json
@@ -72,8 +72,8 @@
"mask": "url(#water)",
"shape-rendering": "optimizespeed"
},
- "#rose": {
- "transform": null
+ "#compass > use": {
+ "transform": "translate(80 80) scale(0.25)"
},
"#relig": {
"opacity": 0.7,
diff --git a/styles/gloom.json b/styles/gloom.json
index 72c123e1..766db87b 100644
--- a/styles/gloom.json
+++ b/styles/gloom.json
@@ -73,7 +73,7 @@
"mask": "url(#water)",
"shape-rendering": "optimizespeed"
},
- "#rose": {
+ "#compass > use": {
"transform": "translate(100 100) scale(0.3)"
},
"#relig": {
diff --git a/styles/light.json b/styles/light.json
index 955c7091..30748daf 100644
--- a/styles/light.json
+++ b/styles/light.json
@@ -72,8 +72,8 @@
"mask": "url(#water)",
"shape-rendering": "optimizespeed"
},
- "#rose": {
- "transform": null
+ "#compass > use": {
+ "transform": "translate(80 80) scale(.25)"
},
"#relig": {
"opacity": 0.5,
diff --git a/styles/monochrome.json b/styles/monochrome.json
index c0810154..6af0d6a1 100644
--- a/styles/monochrome.json
+++ b/styles/monochrome.json
@@ -73,8 +73,8 @@
"mask": "url(#water)",
"shape-rendering": "optimizespeed"
},
- "#rose": {
- "transform": null
+ "#compass > use": {
+ "transform": "translate(80 80) scale(.25)"
},
"#relig": {
"opacity": 0.7,
diff --git a/styles/night.json b/styles/night.json
index dbbcf0bf..790cad8d 100644
--- a/styles/night.json
+++ b/styles/night.json
@@ -72,7 +72,7 @@
"mask": "url(#water)",
"shape-rendering": "optimizespeed"
},
- "#rose": {
+ "#compass > use": {
"transform": "translate(80 80) scale(0.25)"
},
"#relig": {
diff --git a/styles/pale.json b/styles/pale.json
index 883c614b..3a32ed6d 100644
--- a/styles/pale.json
+++ b/styles/pale.json
@@ -72,8 +72,8 @@
"mask": "url(#water)",
"shape-rendering": "optimizespeed"
},
- "#rose": {
- "transform": null
+ "#compass > use": {
+ "transform": "translate(80 80) scale(.25)"
},
"#relig": {
"opacity": 0.5,
diff --git a/styles/watercolor.json b/styles/watercolor.json
index 2605433c..4386940f 100644
--- a/styles/watercolor.json
+++ b/styles/watercolor.json
@@ -72,7 +72,7 @@
"mask": "url(#water)",
"shape-rendering": "optimizespeed"
},
- "#rose": {
+ "#compass > use": {
"transform": "translate(80 80) scale(.25)"
},
"#relig": {
diff --git a/versioning.js b/versioning.js
index 0a72c745..5fa763d4 100644
--- a/versioning.js
+++ b/versioning.js
@@ -1,7 +1,7 @@
"use strict";
// version and caching control
-const version = "1.97.16"; // generator version, update each time
+const version = "1.98.00"; // generator version, update each time
{
document.title += " v" + version;