fix (web): panorama / 360 view - partial panorama: use photo-sphere-viewer (#6992)

* panorama viewer fixes

* prettifier

* fix
This commit is contained in:
Dmitry Brazhenko 2024-02-09 17:17:51 +01:00 committed by GitHub
parent e4561f26e8
commit 2ee9044b6a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 44 additions and 51 deletions

View file

@ -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} />