fix: redraw features on load

This commit is contained in:
Azgaar 2024-09-25 13:18:22 +02:00
parent 879cf6b692
commit 949a486bf8
4 changed files with 16 additions and 12 deletions

View file

@ -8118,7 +8118,7 @@
<script defer src="libs/rgbquant.min.js"></script>
<script defer src="libs/jquery.ui.touch-punch.min.js"></script>
<script defer src="modules/io/save.js?v=1.100.00"></script>
<script defer src="modules/io/load.js?v=1.104.12"></script>
<script defer src="modules/io/load.js?v=1.105.5"></script>
<script defer src="modules/io/cloud.js?v=1.99.00"></script>
<script defer src="modules/io/export.js?v=1.100.00"></script>

View file

@ -946,19 +946,23 @@ export function resolveVersionConflicts(mapVersion) {
// v1.104.00 separated pole of inaccessibility detection from layer rendering
BurgsAndStates.getPoles();
Provinces.getPoles();
// v1.104.00 removed some layers from initial render
viewbox.select("#icons").style("display", null);
viewbox.select("#ice").style("display", null);
// v1.104.00 added featurePaths to defs
const featurePaths = defs.select("#featurePaths");
if (!featurePaths.size()) defs.append("g").attr("id", "featurePaths");
}
if (isOlderThan("1.105.0")) {
// v1.104.0 introduced some bugs
// v1.104.0 introduced some bugs with layers visibility
viewbox.select("#icons").style("display", null);
viewbox.select("#ice").style("display", null);
viewbox.select("#regions").style("display", null);
viewbox.select("#armies").style("display", null);
}
if (isOlderThan("1.106.0")) {
// v1.104.0 introduced bugs with coastlines. Redraw features
defs.select("#featurePaths").remove();
defs.append("g").attr("id", "featurePaths");
defs.select("#land").selectAll("path, use").remove();
defs.select("#water").selectAll("path, use").remove();
viewbox.select("#coastline").selectAll("path, use").remove();
drawFeatures();
}
}

View file

@ -459,7 +459,7 @@ async function parseLoadedData(data, mapVersion) {
{
// dynamically import and run auto-update script
const {resolveVersionConflicts} = await import("../dynamic/auto-update.js?v=1.104.12");
const {resolveVersionConflicts} = await import("../dynamic/auto-update.js?v=1.105.5");
resolveVersionConflicts(mapVersion);
}

View file

@ -12,7 +12,7 @@
*
* Example: 1.102.2 -> Major version 1, Minor version 102, Patch version 2
*/
const VERSION = "1.105.4";
const VERSION = "1.105.5";
if (parseMapVersion(VERSION) !== VERSION) alert("versioning.js: Invalid format or parsing function");
{