diff --git a/index.html b/index.html
index 052dfe04..18e67866 100644
--- a/index.html
+++ b/index.html
@@ -7940,7 +7940,7 @@
-
+
diff --git a/modules/dynamic/auto-update.js b/modules/dynamic/auto-update.js
index 787cabee..5bcb2c2b 100644
--- a/modules/dynamic/auto-update.js
+++ b/modules/dynamic/auto-update.js
@@ -637,10 +637,11 @@ export function resolveVersionConflicts(version) {
});
}
- if (version < 1.9) {
+ if (version < 1.91) {
// from v1.90.02 texture image is always there
if (!texture.selectAll("*").size()) {
texture.style("display", "none");
+
texture
.append("image")
.attr("id", "textureImage")
@@ -649,9 +650,7 @@ export function resolveVersionConflicts(version) {
.attr("preserveAspectRatio", "xMidYMid slice")
.attr("src", "https://i2.wp.com/azgaar.files.wordpress.com/2021/10/marble-big.jpg");
}
- }
- if (version < 1.91) {
// from 1.91.00 custom coa is moved to coa object
pack.states.forEach(state => {
if (state.coa === "custom") state.coa = {custom: true};
diff --git a/modules/ui/layers.js b/modules/ui/layers.js
index 0020b1f4..95386b79 100644
--- a/modules/ui/layers.js
+++ b/modules/ui/layers.js
@@ -1518,8 +1518,9 @@ function toggleTexture(event) {
if (!layerIsOn("toggleTexture")) {
turnButtonOn("toggleTexture");
// href is not set directly to avoid image loading when layer is off
- const src = texture.select("image").attr("src");
- texture.select("image").attr("href", src);
+ const textureImage = byId("textureImage");
+ if (textureImage) textureImage.setAttribute("href", textureImage.getAttribute("src"));
+
if (event && isCtrlClick(event)) editStyle("texture");
} else {
if (event && isCtrlClick(event)) return editStyle("texture");
diff --git a/versioning.js b/versioning.js
index 0afe7e11..b1eed58b 100644
--- a/versioning.js
+++ b/versioning.js
@@ -1,7 +1,7 @@
"use strict";
// version and caching control
-const version = "1.91.01"; // generator version, update each time
+const version = "1.91.02"; // generator version, update each time
{
document.title += " v" + version;