Fix ratio

This commit is contained in:
Nick Mowen 2023-06-21 16:52:26 -06:00
parent 437765b434
commit 87a04c17f3

View File

@ -30,8 +30,8 @@ export default function TimelineEventOverlay({ event, eventOverlay, cameraConfig
}; };
const getObjectRatio = () => { const getObjectRatio = () => {
const width = eventOverlay.data.box[2] * 100; const width = eventOverlay.data.box[2] * cameraConfig.detect.width;
const height = eventOverlay.data.box[3] * 100; const height = eventOverlay.data.box[3] * cameraConfig.detect.height;
return Math.round(100 * (width / height)) / 100; return Math.round(100 * (width / height)) / 100;
}; };