Merge pull request #17705 from Scroody/I-17703
Fix: Cameras don't obstruct buttons anymore.
This commit is contained in:
commit
6affbcc511
@ -154,7 +154,13 @@ const WebcamComponent = ({
|
|||||||
if (isRTL) {
|
if (isRTL) {
|
||||||
draggableOffset.left = draggableOffset.left * -1;
|
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 (
|
return (
|
||||||
<>
|
<>
|
||||||
{isDragging ? <DropAreaContainer /> : null}
|
{isDragging ? <DropAreaContainer /> : null}
|
||||||
@ -236,9 +242,9 @@ const WebcamComponent = ({
|
|||||||
role="region"
|
role="region"
|
||||||
draggable={cameraDock.isDraggable && !isFullscreen ? 'true' : undefined}
|
draggable={cameraDock.isDraggable && !isFullscreen ? 'true' : undefined}
|
||||||
style={{
|
style={{
|
||||||
width: `${isDragging ? cameraSize.width : cameraDock.width}pt`,
|
width: isIphone ? mobileWidth : isDesktopWidth,
|
||||||
height: `${isDragging ? cameraSize.height : cameraDock.height}pt`,
|
height: isIphone ? mobileHeight : isDesktopHeight,
|
||||||
opacity: isDragging ? 0.5 : undefined,
|
opacity: camOpacity,
|
||||||
background: isCameraSidebar ? colorContentBackground : null,
|
background: isCameraSidebar ? colorContentBackground : null,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
Loading…
Reference in New Issue
Block a user