Chore: housekeeping: lint

This commit is contained in:
Pieter Vander Vennet 2023-12-19 22:08:00 +01:00
parent 2cbd709d71
commit 663b194247
334 changed files with 4675 additions and 1730 deletions

View file

@ -1,28 +1,27 @@
<script lang="ts">
/**
* The image preview allows to drag and zoom in to the image
*/
import panzoom from "panzoom"
import type { ProvidedImage } from "../../Logic/ImageProviders/ImageProvider"
/**
* The image preview allows to drag and zoom in to the image
*/
import panzoom from "panzoom"
import type { ProvidedImage } from "../../Logic/ImageProviders/ImageProvider"
export let image: ProvidedImage
let panzoomInstance = undefined
let panzoomEl: HTMLElement
export let image : ProvidedImage
let panzoomInstance = undefined
let panzoomEl: HTMLElement
$: {
if (panzoomEl) {
panzoomInstance = panzoom(panzoomEl, { bounds: true,
boundsPadding: 0.49,
minZoom: 1,
maxZoom: 25,
initialZoom: 1.2
})
} else {
panzoomInstance?.dispose()
}
$: {
if (panzoomEl) {
panzoomInstance = panzoom(panzoomEl, {
bounds: true,
boundsPadding: 0.49,
minZoom: 1,
maxZoom: 25,
initialZoom: 1.2,
})
} else {
panzoomInstance?.dispose()
}
}
</script>
<img bind:this={panzoomEl} src={image.url_hd ?? image.url} class="w-fit h-fit panzoom-image"/>
<img bind:this={panzoomEl} src={image.url_hd ?? image.url} class="panzoom-image h-fit w-fit" />