mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
fix (web): panorama / 360 view - partial panorama: use photo-sphere-viewer (#6992)
* panorama viewer fixes * prettifier * fix
This commit is contained in:
parent
e4561f26e8
commit
2ee9044b6a
4 changed files with 44 additions and 51 deletions
|
|
@ -0,0 +1,27 @@
|
|||
<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,
|
||||
touchmoveTwoFingers: true,
|
||||
mousewheelCtrlKey: false,
|
||||
navbar: false,
|
||||
});
|
||||
});
|
||||
|
||||
onDestroy(() => {
|
||||
if (viewer) {
|
||||
viewer.destroy();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<div class="h-full w-full mb-0" bind:this={container} />
|
||||
Loading…
Add table
Add a link
Reference in a new issue