fix loading game from textarea (copy/paste)
This commit is contained in:
parent
c8b6c772ab
commit
23b99b8ea7
|
@ -1,11 +1,11 @@
|
|||
[package]
|
||||
name = "pixsy"
|
||||
version = "0.72.7"
|
||||
version = "0.72.8"
|
||||
description = "convert images to Bitsy rooms"
|
||||
authors = ["Max Bradbury <max@tinybird.info>"]
|
||||
edition = "2018"
|
||||
license = "MIT"
|
||||
repository = "https://tinybird.dev/max/image-to-bitsy"
|
||||
repository = "https://tinybird.dev/max/pixsy"
|
||||
|
||||
[lib]
|
||||
crate-type = ["cdylib"]
|
||||
|
|
|
@ -126,7 +126,6 @@ async function run() {
|
|||
el("game").addEventListener("change", function() {
|
||||
readFile(this, function (e) {
|
||||
textareaGameDataInput.value = e.target.result;
|
||||
console.log(load_game(e.target.result));
|
||||
checkGameData();
|
||||
}, "text");
|
||||
});
|
||||
|
@ -152,7 +151,10 @@ async function run() {
|
|||
}
|
||||
|
||||
function checkGameData() {
|
||||
if (textareaGameDataInput.value.length > 0) {
|
||||
let result = load_game(textareaGameDataInput.value)
|
||||
console.log(result);
|
||||
|
||||
if (result === "Loaded game") {
|
||||
buttonGameDataProceed.removeAttribute("disabled");
|
||||
setPaletteDropdown();
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue