forked from MapComplete/MapComplete
chore: automated housekeeping...
This commit is contained in:
parent
1c595437dd
commit
3740140964
13 changed files with 194 additions and 48 deletions
|
@ -37,13 +37,16 @@
|
|||
if (!shown) {
|
||||
previewedImage?.set(undefined)
|
||||
}
|
||||
}),
|
||||
})
|
||||
)
|
||||
if (previewedImage) {
|
||||
onDestroy(
|
||||
previewedImage.addCallbackAndRun((previewedImage) => {
|
||||
showBigPreview.set(previewedImage !== undefined && (previewedImage?.id ?? previewedImage?.url) === (image.id ?? image.url))
|
||||
}),
|
||||
showBigPreview.set(
|
||||
previewedImage !== undefined &&
|
||||
(previewedImage?.id ?? previewedImage?.url) === (image.id ?? image.url)
|
||||
)
|
||||
})
|
||||
)
|
||||
}
|
||||
|
||||
|
@ -90,7 +93,6 @@
|
|||
</div>
|
||||
</Popup>
|
||||
|
||||
|
||||
{#if image.status !== undefined && image.status !== "ready" && image.status !== "hidden"}
|
||||
<div class="flex h-full flex-col justify-center">
|
||||
<Loading>
|
||||
|
@ -115,7 +117,7 @@
|
|||
class={imgClass ?? ""}
|
||||
class:cursor-zoom-in={canZoom}
|
||||
on:click={() => {
|
||||
console.log("Setting",image.url)
|
||||
console.log("Setting", image.url)
|
||||
previewedImage?.set(image)
|
||||
}}
|
||||
on:error={() => {
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
import Translations from "../i18n/Translations"
|
||||
import DotMenu from "../Base/DotMenu.svelte"
|
||||
|
||||
export let image: Partial<ProvidedImage> & ({ id: string, url: string })
|
||||
export let image: Partial<ProvidedImage> & { id: string; url: string }
|
||||
export let clss: string = undefined
|
||||
|
||||
let isLoaded = new UIEventSource(false)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue