diff --git a/web/src/components/overlay/detail/ObjectLifecycle.tsx b/web/src/components/overlay/detail/ObjectLifecycle.tsx index c2da8ec36..fb27966df 100644 --- a/web/src/components/overlay/detail/ObjectLifecycle.tsx +++ b/web/src/components/overlay/detail/ObjectLifecycle.tsx @@ -77,6 +77,17 @@ export default function ObjectLifecycle({ const [showControls, setShowControls] = useState(false); const [showZones, setShowZones] = useState(true); + const aspectRatio = useMemo(() => { + if (!config) { + return 16 / 9; + } + + return ( + config.cameras[event.camera].detect.width / + config.cameras[event.camera].detect.height + ); + }, [config, event]); + const getZoneColor = useCallback( (zoneName: string) => { const zoneColor = @@ -240,7 +251,15 @@ export default function ObjectLifecycle({ )} -