tweaks ns tuff
This commit is contained in:
parent
39c236e920
commit
06451b7efe
|
@ -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}
|
||||
<div id="canvas"><Chart topText={top} leftText={left} rightText={right} bottomText={bot} fontSize=14/></div>
|
||||
{/key}
|
||||
{#each [...$images, currentImage] as img}
|
||||
{#each [...$images, currentImage] as img, i}
|
||||
{#if img && img.file}
|
||||
<div class="img" style="top: {Math.floor(img.y*512)}px; left: {Math.floor((img.x-0.5)*512)}px">
|
||||
<div class="img" style="top: {Math.floor(img.y*512)-i*64}px; left: {Math.floor((img.x)*512)}px">
|
||||
<Popover>
|
||||
<div class="img-container">
|
||||
<img class="img-file" src="{img.file}" alt="{img.name}">
|
||||
</div>
|
||||
<div slot="popover-content">
|
||||
<div slot="popover-content" class="popover-content">
|
||||
<PopoverButton>{img.name}</PopoverButton>
|
||||
</div>
|
||||
</Popover>
|
||||
|
@ -207,7 +220,7 @@
|
|||
reader.readAsDataURL(upload);
|
||||
}}/>
|
||||
{#if upload != null}
|
||||
<FileTile file={upload} on:delete={() => upload = null}/>
|
||||
<FileTile file={upload} on:delete={() => {upload = null; currentImage.file = null}}/>
|
||||
{/if}
|
||||
<br>
|
||||
<FormField
|
||||
|
|
Loading…
Reference in New Issue