fix: reset zoom when navigating between assets (#25863)

This commit is contained in:
Michel Heusschen
2026-02-03 18:07:06 +01:00
committed by GitHub
parent 2990bde0bb
commit 5212bca3d0
2 changed files with 17 additions and 14 deletions
@@ -55,13 +55,10 @@
let loader = $state<HTMLImageElement>();
assetViewerManager.zoomState = {
currentRotation: 0,
currentZoom: 1,
enable: true,
currentPositionX: 0,
currentPositionY: 0,
};
$effect.pre(() => {
void asset.id;
untrack(() => assetViewerManager.resetZoomState());
});
onDestroy(() => {
$boundingBoxesArray = [];