mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 09:41:24 +01:00
select template correctly
This commit is contained in:
parent
395a7c28a9
commit
c2ceb227ad
2 changed files with 3 additions and 3 deletions
|
|
@ -9,7 +9,8 @@ window.HeightmapGenerator = (function () {
|
|||
cells.h = new Uint8Array(grid.points.length);
|
||||
|
||||
const input = document.getElementById("templateInput");
|
||||
const type = input.querySelector(`[value=${input.value}]`).parentElement.label;
|
||||
const selectedId = input.selectedIndex >= 0 ? input.selectedIndex : 0;
|
||||
const type = input.options[selectedId]?.parentElement?.label;
|
||||
|
||||
if (type === "Specific") {
|
||||
// pre-defined heightmap
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue