From d0395624afb806ac88aa163ba44ac12ead352d14 Mon Sep 17 00:00:00 2001 From: Azgaar Date: Thu, 8 Jan 2026 18:36:21 +0100 Subject: [PATCH] fix: update group style for old versions --- index.html | 2 +- modules/dynamic/auto-update.js | 12 +++++++++--- modules/io/load.js | 2 +- versioning.js | 2 +- 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/index.html b/index.html index 210513c3..686c9994 100644 --- a/index.html +++ b/index.html @@ -8563,7 +8563,7 @@ - + diff --git a/modules/dynamic/auto-update.js b/modules/dynamic/auto-update.js index 124abfb2..26cc7f1c 100644 --- a/modules/dynamic/auto-update.js +++ b/modules/dynamic/auto-update.js @@ -996,6 +996,7 @@ export function resolveVersionConflicts(mapVersion) { const name = this.id; const isDefault = name === "towns"; 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; this.removeAttribute("size"); @@ -1013,11 +1014,15 @@ export function resolveVersionConflicts(mapVersion) { this.removeAttribute("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"); - if (iconSymbol) { - iconSymbol.outerHTML = /* html */ ` + const anchorSymbol = byId("icon-anchor"); + if (anchorSymbol) { + anchorSymbol.outerHTML = /* html */ ` `; } @@ -1034,6 +1039,7 @@ export function resolveVersionConflicts(mapVersion) { }); layerIsOn("toggleBurgIcons") && drawBurgIcons(); + layerIsOn("toggleLabels") && drawBurgLabels(); delete options.showBurgPreview; delete options.showMFCGMap; diff --git a/modules/io/load.js b/modules/io/load.js index 15d85358..d1a365f9 100644 --- a/modules/io/load.js +++ b/modules/io/load.js @@ -472,7 +472,7 @@ async function parseLoadedData(data, mapVersion) { { // 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); } diff --git a/versioning.js b/versioning.js index c3a6da86..855c99bc 100644 --- a/versioning.js +++ b/versioning.js @@ -13,7 +13,7 @@ * 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"); {