mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-05 10:45:21 +03:00
Fix ratio
This commit is contained in:
parent
a55c5c42e5
commit
4f92fa2552
@ -30,8 +30,8 @@ export default function TimelineEventOverlay({ event, eventOverlay, cameraConfig
|
||||
};
|
||||
|
||||
const getObjectRatio = () => {
|
||||
const width = eventOverlay.data.box[2] * 100;
|
||||
const height = eventOverlay.data.box[3] * 100;
|
||||
const width = eventOverlay.data.box[2] * cameraConfig.detect.width;
|
||||
const height = eventOverlay.data.box[3] * cameraConfig.detect.height;
|
||||
return Math.round(100 * (width / height)) / 100;
|
||||
};
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user