diff --git a/src/ChartEdit.svelte b/src/ChartEdit.svelte index 600cc4e..667c0bd 100644 --- a/src/ChartEdit.svelte +++ b/src/ChartEdit.svelte @@ -76,6 +76,7 @@ if (response.ok) { submitting = false; currentImage = {file: null, name: '', x: 0.5, y: 0.5} + upload = null; } else { submitting = false; if (response.body) { @@ -113,10 +114,6 @@ height: auto; } - #chart * { - position: relative; - } - #canvas { position: absolute; } @@ -138,6 +135,22 @@ height: 100%; } + .img { + position: relative; + width: 64px; + height: 64px; + } + + .img * { + width: 64px; + height: 64px; + } + + .img *:last-child, .img *:last-child { + z-index: 999; + height: unset; + } + @media (max-width: 650px) { #panels { flex-direction: column; @@ -182,14 +195,14 @@ {#key top + left + right + bot}
{/key} - {#each [...$images, currentImage] as img} + {#each [...$images, currentImage] as img, i} {#if img && img.file} -
+
{img.name}
-
+
{img.name}
@@ -207,7 +220,7 @@ reader.readAsDataURL(upload); }}/> {#if upload != null} - upload = null}/> + {upload = null; currentImage.file = null}}/> {/if}