fix game data bugs; tidyup
This commit is contained in:
parent
e7641255e5
commit
d32ad0d27d
|
@ -41,7 +41,7 @@ async function run() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function clear_game() {
|
function clear_game() {
|
||||||
gameDataInput.innerHTML = "";
|
gameDataInput.value = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
let new_game_button = document.getElementById("new");
|
let new_game_button = document.getElementById("new");
|
||||||
|
@ -96,9 +96,10 @@ async function run() {
|
||||||
|
|
||||||
function addTiles() {
|
function addTiles() {
|
||||||
let image = document.getElementById("preview").getAttribute("src");
|
let image = document.getElementById("preview").getAttribute("src");
|
||||||
let gameData = document.getElementById("game-data").innerHTML;
|
let gameData = document.getElementById("game-data").value;
|
||||||
let prefix = document.getElementById("prefix").value;
|
let prefix = document.getElementById("prefix").value;
|
||||||
document.getElementById("output").innerHTML = add_tiles(gameData, image, prefix);
|
|
||||||
|
output.value = add_tiles(gameData, image, prefix);
|
||||||
}
|
}
|
||||||
|
|
||||||
const importButton = document.getElementById("import");
|
const importButton = document.getElementById("import");
|
||||||
|
@ -116,7 +117,7 @@ async function run() {
|
||||||
addImageButton.addEventListener("touchend", addImage);
|
addImageButton.addEventListener("touchend", addImage);
|
||||||
|
|
||||||
function reset() {
|
function reset() {
|
||||||
gameDataInput.innerHTML = '';
|
clear_game();
|
||||||
preview.removeAttribute("src");
|
preview.removeAttribute("src");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue