mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 09:41:24 +01:00
fix: textureImage is not defined
This commit is contained in:
parent
1847270482
commit
f7cb157cf3
4 changed files with 7 additions and 7 deletions
|
|
@ -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");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue