fix(web): recalculate face bounding boxes (#26737)

Co-authored-by: Daniel Dietzler <mail@ddietzler.dev>
This commit is contained in:
Andreas Heinz 2026-03-09 19:44:47 +01:00 committed by GitHub
parent 4791d9c0c3
commit 0edbca24e4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -15,7 +15,7 @@
import { SlideshowLook, SlideshowState, slideshowLookCssMapping, slideshowStore } from '$lib/stores/slideshow.store';
import { getAssetUrl, targetImageSize as getTargetImageSize, handlePromiseError } from '$lib/utils';
import { canCopyImageToClipboard, copyImageToClipboard } from '$lib/utils/asset-utils';
import { type ContentMetrics, getContentMetrics } from '$lib/utils/container-utils';
import { getContentMetrics, type ContentMetrics } from '$lib/utils/container-utils';
import { handleError } from '$lib/utils/handle-error';
import { getOcrBoundingBoxes } from '$lib/utils/ocr-utils';
import { getBoundingBox } from '$lib/utils/people-utils';
@ -74,6 +74,9 @@
return { contentWidth: 0, contentHeight: 0, offsetX: 0, offsetY: 0 };
}
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
[containerWidth, containerHeight]; // trigger recomputation on resize
const { contentWidth, contentHeight, offsetX, offsetY } = getContentMetrics(assetViewerManager.imgRef);
const { currentZoom, currentPositionX, currentPositionY } = assetViewerManager.zoomState;