Files
immich/web/src/lib/components/asset-viewer/photo-sphere-viewer-adapter.svelte
T
hrdl 2a26574808 Allow moving in photo spheres using one touch input instead of two. (#8620)
This is the standard behaviour and also more intuitive. As we don't require scrolling when displaying photo spheres this should not impede usability.

Also remove `mousewheelCtrlKey: false`, which is the default.

Co-authored-by: hrdl <7808331-hrdl@users.noreply.gitlab.com>
2024-04-10 04:48:06 +02:00

26 lines
511 B
Svelte

<script lang="ts">
import { Viewer } from '@photo-sphere-viewer/core';
import '@photo-sphere-viewer/core/index.css';
import { onDestroy, onMount } from 'svelte';
export let panorama: string;
let container: HTMLDivElement;
let viewer: Viewer;
onMount(() => {
viewer = new Viewer({
container,
panorama,
navbar: false,
});
});
onDestroy(() => {
if (viewer) {
viewer.destroy();
}
});
</script>
<div class="h-full w-full mb-0" bind:this={container} />