mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 09:41:24 +01:00
1.22.34
This commit is contained in:
parent
8a6108e203
commit
6fbb1a2944
1 changed files with 3 additions and 3 deletions
|
|
@ -2,9 +2,8 @@
|
|||
function editNotes(id, name) {
|
||||
// update list of objects
|
||||
const select = document.getElementById("notesSelect");
|
||||
for (let i = select.options.length; i < notes.length; i++) {
|
||||
select.options.add(new Option(notes[i].id, notes[i].id));
|
||||
}
|
||||
select.options.length = 0;
|
||||
for (const note of notes) {select.options.add(new Option(note.id, note.id));}
|
||||
|
||||
// select an object
|
||||
if (notes.length) {
|
||||
|
|
@ -47,6 +46,7 @@ function editNotes(id, name) {
|
|||
|
||||
function changeObject() {
|
||||
const note = notes.find(note => note.id === this.value);
|
||||
if (!note) return;
|
||||
notesName.value = note.name;
|
||||
notesText.value = note.legend;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue