refactor: use keyed each for face bounding boxes (#26648)

This commit is contained in:
Min Idzelis
2026-03-02 23:16:13 -05:00
committed by GitHub
parent 20c639e52a
commit 4da3d68a67
4 changed files with 10 additions and 4 deletions
+2
View File
@@ -4,6 +4,7 @@ import type { ContentMetrics } from '$lib/utils/container-utils';
import { AssetTypeEnum, type AssetFaceResponseDto } from '@immich/sdk';
export interface BoundingBox {
id: string;
top: number;
left: number;
width: number;
@@ -25,6 +26,7 @@ export const getBoundingBox = (faces: Faces[], metrics: ContentMetrics): Boundin
};
boxes.push({
id: face.id,
top: Math.round(coordinates.y1),
left: Math.round(coordinates.x1),
width: Math.round(coordinates.x2 - coordinates.x1),