fixes issue 8

This commit is contained in:
tim h 2022-11-19 13:49:25 -06:00
parent ff8f4bdb30
commit bcb4593d44
2 changed files with 3 additions and 3 deletions

View file

@ -104,7 +104,7 @@ please do! kindly indicate your OS, browser, versions of both, any errors in dev
- generated images display +1px on x/y during approve/reject state, doesn't affect output, just annoying - generated images display +1px on x/y during approve/reject state, doesn't affect output, just annoying
- erase mask is like entirely broken - erase mask is like entirely broken
- odd-numbered scale factors don't snap correctly - odd-numbered scale factors don't snap correctly
- arbitrary "pasted" images require clicking twice to place them and i _don't know why_ [(yes i do)](#terrible), just getting them to be arbitrarily placable was a giant pain because i'm not got the smarts - ~~arbitrary "pasted" images require clicking twice to place them and i _don't know why_ [(yes i do)](#terrible), just getting them to be arbitrarily placable was a giant pain because i'm not got the smarts~~
- selecting an aribtrary image by double-clicking it in the file picker can sometimes trigger a dream request that errors out if your file picker is "above" the canvas; i tried to alleviate that by temporarily removing the mouse(move/down/up) handlers for the canvas context on selection of a file, but i'm POSITIVE it's an improper solution and not quite sure if it's even fully effective - selecting an aribtrary image by double-clicking it in the file picker can sometimes trigger a dream request that errors out if your file picker is "above" the canvas; i tried to alleviate that by temporarily removing the mouse(move/down/up) handlers for the canvas context on selection of a file, but i'm POSITIVE it's an improper solution and not quite sure if it's even fully effective
## warranty ## warranty

View file

@ -137,10 +137,10 @@ function startup() {
function drop(imageParams) { function drop(imageParams) {
const img = new Image(); const img = new Image();
img.src = arbitraryImageBase64; img.onload = function () {
if (img.complete) {
writeArbitraryImage(img, imageParams.x, imageParams.y) writeArbitraryImage(img, imageParams.x, imageParams.y)
} }
img.src = arbitraryImageBase64;
} }
function writeArbitraryImage(img, x, y) { function writeArbitraryImage(img, x, y) {