fix(web): integrate zoom toggle button into panorama photo viewer (#24189)

This commit is contained in:
Mees Frensel
2025-11-28 18:50:16 +01:00
committed by GitHub
parent c0a3b58bba
commit e36261b552
3 changed files with 40 additions and 9 deletions

View File

@@ -7,11 +7,12 @@
import { t } from 'svelte-i18n';
import { fade } from 'svelte/transition';
interface Props {
type Props = {
asset: AssetResponseDto;
}
zoomToggle?: (() => void) | null;
};
const { asset }: Props = $props();
let { asset, zoomToggle = $bindable() }: Props = $props();
const loadAssetData = async (id: string) => {
const data = await viewAsset({ ...authManager.params, id, size: AssetMediaSize.Preview });
@@ -24,6 +25,7 @@
<LoadingSpinner />
{:then [data, { default: PhotoSphereViewer }]}
<PhotoSphereViewer
bind:zoomToggle
panorama={data}
originalPanorama={isWebCompatibleImage(asset)
? getAssetOriginalUrl(asset.id)