mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-11 13:45:25 +03:00
use container aspect in check
This commit is contained in:
parent
8f8fb0f4a7
commit
97abf030d8
@ -247,7 +247,7 @@ export default function LiveCameraView({
|
|||||||
if (isPortrait) {
|
if (isPortrait) {
|
||||||
return "absolute left-0.5 right-0.5 top-[50%] -translate-y-[50%]";
|
return "absolute left-0.5 right-0.5 top-[50%] -translate-y-[50%]";
|
||||||
} else {
|
} else {
|
||||||
if (aspect > aspectRatio) {
|
if (aspect > containerAspectRatio) {
|
||||||
return "p-2 absolute left-0 top-[50%] -translate-y-[50%]";
|
return "p-2 absolute left-0 top-[50%] -translate-y-[50%]";
|
||||||
} else {
|
} else {
|
||||||
return "p-2 absolute top-0.5 bottom-0.5 left-[50%] -translate-x-[50%]";
|
return "p-2 absolute top-0.5 bottom-0.5 left-[50%] -translate-x-[50%]";
|
||||||
@ -256,7 +256,7 @@ export default function LiveCameraView({
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (fullscreen) {
|
if (fullscreen) {
|
||||||
if (aspect > aspectRatio) {
|
if (aspect > containerAspectRatio) {
|
||||||
return "absolute inset-x-2 top-[50%] -translate-y-[50%]";
|
return "absolute inset-x-2 top-[50%] -translate-y-[50%]";
|
||||||
} else {
|
} else {
|
||||||
return "absolute inset-y-2 left-[50%] -translate-x-[50%]";
|
return "absolute inset-y-2 left-[50%] -translate-x-[50%]";
|
||||||
@ -264,7 +264,7 @@ export default function LiveCameraView({
|
|||||||
} else {
|
} else {
|
||||||
return "absolute top-0.5 bottom-0.5 left-[50%] -translate-x-[50%]";
|
return "absolute top-0.5 bottom-0.5 left-[50%] -translate-x-[50%]";
|
||||||
}
|
}
|
||||||
}, [camera, fullscreen, isPortrait, fullResolution, aspectRatio]);
|
}, [camera, fullscreen, isPortrait, fullResolution, containerAspectRatio]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<TransformWrapper minScale={1.0}>
|
<TransformWrapper minScale={1.0}>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user