Merge pull request #17705 from Scroody/I-17703

Fix: Cameras don't obstruct buttons anymore.
This commit is contained in:
Ramón Souza 2023-04-26 15:13:35 -03:00 committed by GitHub
commit 6affbcc511
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -154,7 +154,13 @@ const WebcamComponent = ({
if (isRTL) {
draggableOffset.left = draggableOffset.left * -1;
}
const isIphone = !!(navigator.userAgent.match(/iPhone/i));
const mobileWidth = `${isDragging ? cameraSize.width : cameraDock.width}pt`;
const mobileHeight = `${isDragging ? cameraSize.height : cameraDock.height}pt`;
const isDesktopWidth = isDragging ? cameraSize.width : cameraDock.width;
const isDesktopHeight = isDragging ? cameraSize.height : cameraDock.height;
const camOpacity = isDragging ? 0.5 : undefined;
return (
<>
{isDragging ? <DropAreaContainer /> : null}
@ -236,9 +242,9 @@ const WebcamComponent = ({
role="region"
draggable={cameraDock.isDraggable && !isFullscreen ? 'true' : undefined}
style={{
width: `${isDragging ? cameraSize.width : cameraDock.width}pt`,
height: `${isDragging ? cameraSize.height : cameraDock.height}pt`,
opacity: isDragging ? 0.5 : undefined,
width: isIphone ? mobileWidth : isDesktopWidth,
height: isIphone ? mobileHeight : isDesktopHeight,
opacity: camOpacity,
background: isCameraSidebar ? colorContentBackground : null,
}}
>