mirror of
https://github.com/immich-app/immich.git
synced 2025-12-19 09:13:14 +03:00
fix (web): panorama / 360 view - partial panorama: use photo-sphere-viewer (#6992)
* panorama viewer fixes * prettifier * fix
This commit is contained in:
@@ -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} />
|
||||
Reference in New Issue
Block a user