mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-04-07 23:57:37 +03:00
Merge pull request #89 from ibs0d/claude/add-camera-rotation-support-Lg2l9
Fix: revert cameraAspectRatio inversion for ui.rotate cameras
This commit is contained in:
commit
3c111b2f3b
@ -360,13 +360,11 @@ export default function LiveCameraView({
|
|||||||
}, [windowAspectRatio, containerRef]);
|
}, [windowAspectRatio, containerRef]);
|
||||||
|
|
||||||
const cameraAspectRatio = useMemo(() => {
|
const cameraAspectRatio = useMemo(() => {
|
||||||
let ratio;
|
|
||||||
if (fullResolution.width && fullResolution.height) {
|
if (fullResolution.width && fullResolution.height) {
|
||||||
ratio = fullResolution.width / fullResolution.height;
|
return fullResolution.width / fullResolution.height;
|
||||||
} else {
|
} else {
|
||||||
ratio = camera.detect.width / camera.detect.height;
|
return camera.detect.width / camera.detect.height;
|
||||||
}
|
}
|
||||||
return camera.ui?.rotate ? 1 / ratio : ratio;
|
|
||||||
}, [camera, fullResolution]);
|
}, [camera, fullResolution]);
|
||||||
|
|
||||||
const constrainedAspectRatio = useMemo<number>(() => {
|
const constrainedAspectRatio = useMemo<number>(() => {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user