From c3cfffec87245bddd2e016b916c6c42bfb20bc6b Mon Sep 17 00:00:00 2001 From: Azgaar Date: Wed, 22 Nov 2023 20:35:55 +0400 Subject: [PATCH] fix #1020: recreate texture if it's missing --- index.html | 2 +- modules/io/load.js | 9 +++++++++ versioning.js | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index ff9c45e2..f9756635 100644 --- a/index.html +++ b/index.html @@ -7989,7 +7989,7 @@ - + diff --git a/modules/io/load.js b/modules/io/load.js index d3c97efe..282cf009 100644 --- a/modules/io/load.js +++ b/modules/io/load.js @@ -346,6 +346,15 @@ async function parseLoadedData(data) { burgLabels = labels.select("#burgLabels"); })(); + void (function addMissingElements() { + if (!texture.size()) { + texture = viewbox + .insert("g", "#landmass") + .attr("id", "texture") + .attr("data-href", "./images/textures/plaster.jpg"); + } + })(); + void (function parseGridData() { grid = JSON.parse(data[6]); diff --git a/versioning.js b/versioning.js index e6d0c034..ba1646f2 100644 --- a/versioning.js +++ b/versioning.js @@ -1,7 +1,7 @@ "use strict"; // version and caching control -const version = "1.94.04"; // generator version, update each time +const version = "1.94.05"; // generator version, update each time { document.title += " v" + version;