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
437765b434
commit
87a04c17f3
@ -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;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user