Fix: Move image preview below FloatOver, the popup otherwise hides the image preview

This commit is contained in:
Pieter Vander Vennet 2024-04-12 19:49:01 +02:00
parent 368f9ad0c8
commit df1fef28c0

View file

@ -385,18 +385,7 @@
<svelte:fragment slot="error" />
</LoginToggle>
<If condition={state.previewedImage.map((i) => i !== undefined)}>
<FloatOver extraClasses="p-1" on:close={() => state.previewedImage.setData(undefined)}>
<button
class="absolute p-0 right-4 top-4 h-8 w-8 rounded-full"
on:click={() => previewedImage.setData(undefined)}
slot="close-button"
>
<XCircleIcon />
</button>
<ImageOperations image={$previewedImage} />
</FloatOver>
</If>
{#if $selectedElement !== undefined && $selectedLayer !== undefined && !$selectedLayer.popupInFloatover}
<!-- right modal with the selected element view -->
@ -431,6 +420,19 @@
</FloatOver>
{/if}
<If condition={state.previewedImage.map((i) => i !== undefined)}>
<FloatOver extraClasses="p-1" on:close={() => state.previewedImage.setData(undefined)}>
<button
class="absolute p-0 right-4 top-4 h-8 w-8 rounded-full"
on:click={() => previewedImage.setData(undefined)}
slot="close-button"
>
<XCircleIcon />
</button>
<ImageOperations image={$previewedImage} />
</FloatOver>
</If>
<If condition={state.guistate.themeIsOpened}>
<!-- Theme menu -->
<FloatOver on:close={() => state.guistate.themeIsOpened.setData(false)}>