fix "back to image" button

This commit is contained in:
Max Bradbury 2020-07-20 18:57:24 +01:00
parent 6c32827ae5
commit d3c72f7738
2 changed files with 3 additions and 1 deletions

View File

@ -59,7 +59,7 @@ html(lang="en-gb")
to generate these alternate versions here. to generate these alternate versions here.
p. p.
don't worry - #[i tilesy] will not create duplicate tiles. don't worry - #[i tilesy] will not create duplicate tiles.
button.pagination.prev previous button.pagination.prev#back-to-image previous
button.pagination.next#import next button.pagination.next#import next
.page.download .page.download
h2 download h2 download

View File

@ -47,6 +47,7 @@ async function run() {
await init(); await init();
const buttonAddImage = el("add"); const buttonAddImage = el("add");
const buttonBackToImage = el("back-to-image");
const buttonDownload = el("download"); const buttonDownload = el("download");
const buttonGameDataProceed = el("game-data-next"); const buttonGameDataProceed = el("game-data-next");
const buttonImportGame = el("import"); const buttonImportGame = el("import");
@ -150,6 +151,7 @@ async function run() {
function addImage() { function addImage() {
textareaGameDataInput.value = textareaGameDataOutput.value; textareaGameDataInput.value = textareaGameDataOutput.value;
textareaGameDataOutput.value = ""; textareaGameDataOutput.value = "";
buttonBackToImage.click();
} }
buttonAddImage.addEventListener("click", addImage); buttonAddImage.addEventListener("click", addImage);