Use full resolution aspect for main camera style in history view

This commit is contained in:
Josh Hawkins 2024-07-04 09:56:36 -05:00
parent 188a7de467
commit 53b31224c1

View File

@ -314,7 +314,10 @@ export function RecordingView({
return undefined;
}
const aspect = camera.detect.width / camera.detect.height;
const aspect =
fullResolution.width && fullResolution.height
? fullResolution.width / fullResolution.height
: camera.detect.width / camera.detect.height;
if (!aspect) {
return undefined;
@ -336,7 +339,14 @@ export function RecordingView({
return {
width: `${Math.round(percent)}%`,
};
}, [config, mainCameraAspect, mainWidth, mainHeight, mainCamera]);
}, [
config,
mainCameraAspect,
mainWidth,
mainHeight,
mainCamera,
fullResolution,
]);
const previewRowOverflows = useMemo(() => {
if (!previewRowRef.current) {