mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2026-02-04 09:31:23 +01:00
fix: update group style for old versions
This commit is contained in:
parent
50f51bd838
commit
d0395624af
4 changed files with 12 additions and 6 deletions
|
|
@ -8563,7 +8563,7 @@
|
||||||
<script defer src="libs/rgbquant.min.js"></script>
|
<script defer src="libs/rgbquant.min.js"></script>
|
||||||
<script defer src="libs/jquery.ui.touch-punch.min.js"></script>
|
<script defer src="libs/jquery.ui.touch-punch.min.js"></script>
|
||||||
<script defer src="modules/io/save.js?v=1.107.4"></script>
|
<script defer src="modules/io/save.js?v=1.107.4"></script>
|
||||||
<script defer src="modules/io/load.js?v=1.108.0"></script>
|
<script defer src="modules/io/load.js?v=1.109.2"></script>
|
||||||
<script defer src="modules/io/cloud.js?v=1.106.0"></script>
|
<script defer src="modules/io/cloud.js?v=1.106.0"></script>
|
||||||
<script defer src="modules/io/export.js?v=1.108.13"></script>
|
<script defer src="modules/io/export.js?v=1.108.13"></script>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -996,6 +996,7 @@ export function resolveVersionConflicts(mapVersion) {
|
||||||
const name = this.id;
|
const name = this.id;
|
||||||
const isDefault = name === "towns";
|
const isDefault = name === "towns";
|
||||||
options.burgs.groups.push({name, active: true, order: index + 1, isDefault, preview: "watabou-city"});
|
options.burgs.groups.push({name, active: true, order: index + 1, isDefault, preview: "watabou-city"});
|
||||||
|
if (!this.dataset.icon) this.dataset.icon = "#icon-circle";
|
||||||
|
|
||||||
const size = Number(this.getAttribute("size") || 2) * 2;
|
const size = Number(this.getAttribute("size") || 2) * 2;
|
||||||
this.removeAttribute("size");
|
this.removeAttribute("size");
|
||||||
|
|
@ -1013,11 +1014,15 @@ export function resolveVersionConflicts(mapVersion) {
|
||||||
this.removeAttribute("size");
|
this.removeAttribute("size");
|
||||||
this.setAttribute("font-size", size);
|
this.setAttribute("font-size", size);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
burgLabels.selectAll("g").each(function () {
|
||||||
|
if (!this.dataset.dy) this.dataset.dy = -0.4;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
const iconSymbol = byId("icon-anchor");
|
const anchorSymbol = byId("icon-anchor");
|
||||||
if (iconSymbol) {
|
if (anchorSymbol) {
|
||||||
iconSymbol.outerHTML = /* html */ `<symbol id="icon-anchor" viewBox="0 0 30 30" width="1em" height="1em" overflow="visible">
|
anchorSymbol.outerHTML = /* html */ `<symbol id="icon-anchor" viewBox="0 0 30 30" width="1em" height="1em" overflow="visible">
|
||||||
<path d="m 1.003,-9.873 c 0,-0.547 -0.453,-1 -1,-1 -0.547,0 -1,0.453 -1,1 0,0.547 0.453,1 1,1 0.547,0 1,-0.453 1,-1 z m 13,14.5 v 5.5 c 0,0.203 -0.125,0.391 -0.313,0.469 -0.063,0.016 -0.125,0.031 -0.187,0.031 -0.125,0 -0.25,-0.047 -0.359,-0.141 L 11.691,9.033 c -2.453,2.953 -6.859,4.844 -11.688,4.844 -4.829,0 -9.234,-1.891 -11.688,-4.844 l -1.453,1.453 c -0.094,0.094 -0.234,0.141 -0.359,0.141 -0.063,0 -0.125,-0.016 -0.187,-0.031 -0.187,-0.078 -0.313,-0.266 -0.313,-0.469 v -5.5 c 0,-0.281 0.219,-0.5 0.5,-0.5 h 5.5 c 0.203,0 0.391,0.125 0.469,0.313 0.078,0.188 0.031,0.391 -0.109,0.547 L -9.2,6.55 c 1.406,1.891 4.109,3.266 7.203,3.687 V 0.128 h -3 c -0.547,0 -1,-0.453 -1,-1 v -2 c 0,-0.547 0.453,-1 1,-1 h 3 v -2.547 c -1.188,-0.688 -2,-1.969 -2,-3.453 0,-2.203 1.797,-4 4,-4 2.203,0 4,1.797 4,4 0,1.484 -0.812,2.766 -2,3.453 v 2.547 h 3 c 0.547,0 1,0.453 1,1 v 2 c 0,0.547 -0.453,1 -1,1 h -3 V 10.237 C 5.097,9.815 7.8,8.44 9.206,6.55 L 7.643,4.987 C 7.502,4.831 7.456,4.628 7.534,4.44 7.612,4.252 7.8,4.127 8.003,4.127 h 5.5 c 0.281,0 0.5,0.219 0.5,0.5 z"/>
|
<path d="m 1.003,-9.873 c 0,-0.547 -0.453,-1 -1,-1 -0.547,0 -1,0.453 -1,1 0,0.547 0.453,1 1,1 0.547,0 1,-0.453 1,-1 z m 13,14.5 v 5.5 c 0,0.203 -0.125,0.391 -0.313,0.469 -0.063,0.016 -0.125,0.031 -0.187,0.031 -0.125,0 -0.25,-0.047 -0.359,-0.141 L 11.691,9.033 c -2.453,2.953 -6.859,4.844 -11.688,4.844 -4.829,0 -9.234,-1.891 -11.688,-4.844 l -1.453,1.453 c -0.094,0.094 -0.234,0.141 -0.359,0.141 -0.063,0 -0.125,-0.016 -0.187,-0.031 -0.187,-0.078 -0.313,-0.266 -0.313,-0.469 v -5.5 c 0,-0.281 0.219,-0.5 0.5,-0.5 h 5.5 c 0.203,0 0.391,0.125 0.469,0.313 0.078,0.188 0.031,0.391 -0.109,0.547 L -9.2,6.55 c 1.406,1.891 4.109,3.266 7.203,3.687 V 0.128 h -3 c -0.547,0 -1,-0.453 -1,-1 v -2 c 0,-0.547 0.453,-1 1,-1 h 3 v -2.547 c -1.188,-0.688 -2,-1.969 -2,-3.453 0,-2.203 1.797,-4 4,-4 2.203,0 4,1.797 4,4 0,1.484 -0.812,2.766 -2,3.453 v 2.547 h 3 c 0.547,0 1,0.453 1,1 v 2 c 0,0.547 -0.453,1 -1,1 h -3 V 10.237 C 5.097,9.815 7.8,8.44 9.206,6.55 L 7.643,4.987 C 7.502,4.831 7.456,4.628 7.534,4.44 7.612,4.252 7.8,4.127 8.003,4.127 h 5.5 c 0.281,0 0.5,0.219 0.5,0.5 z"/>
|
||||||
</symbol>`;
|
</symbol>`;
|
||||||
}
|
}
|
||||||
|
|
@ -1034,6 +1039,7 @@ export function resolveVersionConflicts(mapVersion) {
|
||||||
});
|
});
|
||||||
|
|
||||||
layerIsOn("toggleBurgIcons") && drawBurgIcons();
|
layerIsOn("toggleBurgIcons") && drawBurgIcons();
|
||||||
|
layerIsOn("toggleLabels") && drawBurgLabels();
|
||||||
|
|
||||||
delete options.showBurgPreview;
|
delete options.showBurgPreview;
|
||||||
delete options.showMFCGMap;
|
delete options.showMFCGMap;
|
||||||
|
|
|
||||||
|
|
@ -472,7 +472,7 @@ async function parseLoadedData(data, mapVersion) {
|
||||||
|
|
||||||
{
|
{
|
||||||
// dynamically import and run auto-update script
|
// dynamically import and run auto-update script
|
||||||
const {resolveVersionConflicts} = await import("../dynamic/auto-update.js?v=1.108.0");
|
const {resolveVersionConflicts} = await import("../dynamic/auto-update.js?v=1.109.2");
|
||||||
resolveVersionConflicts(mapVersion);
|
resolveVersionConflicts(mapVersion);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@
|
||||||
* Example: 1.102.2 -> Major version 1, Minor version 102, Patch version 2
|
* Example: 1.102.2 -> Major version 1, Minor version 102, Patch version 2
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const VERSION = "1.109.1";
|
const VERSION = "1.109.2";
|
||||||
if (parseMapVersion(VERSION) !== VERSION) alert("versioning.js: Invalid format or parsing function");
|
if (parseMapVersion(VERSION) !== VERSION) alert("versioning.js: Invalid format or parsing function");
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue