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
|
|
@ -7940,7 +7940,7 @@
|
||||||
<script src="config/heightmap-templates.js"></script>
|
<script src="config/heightmap-templates.js"></script>
|
||||||
<script src="config/precreated-heightmaps.js"></script>
|
<script src="config/precreated-heightmaps.js"></script>
|
||||||
<script src="modules/heightmap-generator.js?v=1.88.00"></script>
|
<script src="modules/heightmap-generator.js?v=1.88.00"></script>
|
||||||
<script src="modules/ocean-layers.js?v=1.91.00"></script>
|
<script src="modules/ocean-layers.js?v=1.91.02"></script>
|
||||||
<script src="modules/river-generator.js?v=1.89.13"></script>
|
<script src="modules/river-generator.js?v=1.89.13"></script>
|
||||||
<script src="modules/lakes.js"></script>
|
<script src="modules/lakes.js"></script>
|
||||||
<script src="modules/names-generator.js?v=1.87.14"></script>
|
<script src="modules/names-generator.js?v=1.87.14"></script>
|
||||||
|
|
|
||||||
|
|
@ -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
|
// from v1.90.02 texture image is always there
|
||||||
if (!texture.selectAll("*").size()) {
|
if (!texture.selectAll("*").size()) {
|
||||||
texture.style("display", "none");
|
texture.style("display", "none");
|
||||||
|
|
||||||
texture
|
texture
|
||||||
.append("image")
|
.append("image")
|
||||||
.attr("id", "textureImage")
|
.attr("id", "textureImage")
|
||||||
|
|
@ -649,9 +650,7 @@ export function resolveVersionConflicts(version) {
|
||||||
.attr("preserveAspectRatio", "xMidYMid slice")
|
.attr("preserveAspectRatio", "xMidYMid slice")
|
||||||
.attr("src", "https://i2.wp.com/azgaar.files.wordpress.com/2021/10/marble-big.jpg");
|
.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
|
// from 1.91.00 custom coa is moved to coa object
|
||||||
pack.states.forEach(state => {
|
pack.states.forEach(state => {
|
||||||
if (state.coa === "custom") state.coa = {custom: true};
|
if (state.coa === "custom") state.coa = {custom: true};
|
||||||
|
|
|
||||||
|
|
@ -1518,8 +1518,9 @@ function toggleTexture(event) {
|
||||||
if (!layerIsOn("toggleTexture")) {
|
if (!layerIsOn("toggleTexture")) {
|
||||||
turnButtonOn("toggleTexture");
|
turnButtonOn("toggleTexture");
|
||||||
// href is not set directly to avoid image loading when layer is off
|
// href is not set directly to avoid image loading when layer is off
|
||||||
const src = texture.select("image").attr("src");
|
const textureImage = byId("textureImage");
|
||||||
texture.select("image").attr("href", src);
|
if (textureImage) textureImage.setAttribute("href", textureImage.getAttribute("src"));
|
||||||
|
|
||||||
if (event && isCtrlClick(event)) editStyle("texture");
|
if (event && isCtrlClick(event)) editStyle("texture");
|
||||||
} else {
|
} else {
|
||||||
if (event && isCtrlClick(event)) return editStyle("texture");
|
if (event && isCtrlClick(event)) return editStyle("texture");
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
// version and caching control
|
// 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;
|
document.title += " v" + version;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue