fix resizing of sidebar in grid mode

This commit is contained in:
Ramón Souza 2023-06-28 16:06:19 -03:00
parent 9fcfb51487
commit 5cc26a1e7a
5 changed files with 11 additions and 8 deletions

View File

@ -594,7 +594,7 @@ class App extends Component {
<NavBarContainer main="new" />
<WebcamContainer isLayoutSwapped={!presentationIsOpen} layoutType={selectedLayout} />
<Styled.TextMeasure id="text-measure" />
{shouldShowPresentation ? <PresentationAreaContainer darkTheme={darkTheme} presentationIsOpen={presentationIsOpen} /> : null}
{shouldShowPresentation ? <PresentationAreaContainer darkTheme={darkTheme} presentationIsOpen={presentationIsOpen} layoutType={selectedLayout} /> : null}
{shouldShowScreenshare ? <ScreenshareContainer isLayoutSwapped={!presentationIsOpen} /> : null}
{
shouldShowExternalVideo

View File

@ -739,6 +739,9 @@ class Presentation extends PureComponent {
${currentSlide.content}
${intl.formatMessage(intlMessages.slideContentEnd)}` : intl.formatMessage(intlMessages.noSlideContent);
const isVideoFocus = layoutType === LAYOUT_TYPE.VIDEO_FOCUS;
const presentationZIndex = fullscreenContext ? presentationBounds.zIndex : undefined;
return (
<>
<Styled.PresentationContainer
@ -753,9 +756,9 @@ class Presentation extends PureComponent {
height: presentationBounds.height,
display: !presentationIsOpen ? 'none' : 'flex',
overflow: 'hidden',
zIndex: fullscreenContext ? presentationBounds.zIndex : undefined,
zIndex: !isVideoFocus ? presentationZIndex : 0,
background:
layoutType === LAYOUT_TYPE.VIDEO_FOCUS && numCameras > 0 && !fullscreenContext
layoutType === isVideoFocus && !fullscreenContext
? colorContentBackground
: null,
}}

View File

@ -22,11 +22,10 @@ import { DEVICE_TYPE } from '../layout/enums';
import MediaService from '../media/service';
const PresentationContainer = ({
presentationIsOpen, presentationPodIds, mountPresentation, ...props
presentationIsOpen, presentationPodIds, mountPresentation, layoutType, ...props
}) => {
const cameraDock = layoutSelectInput((i) => i.cameraDock);
const presentation = layoutSelectOutput((i) => i.presentation);
const layoutType = layoutSelect((i) => i.layoutType);
const fullscreen = layoutSelect((i) => i.fullscreen);
const deviceType = layoutSelect((i) => i.deviceType);
const layoutContextDispatch = layoutDispatch();

View File

@ -7,13 +7,14 @@ const PresentationArea = ({
height,
presentationIsOpen,
darkTheme,
layoutType,
}) => {
const presentationAreaSize = {
presentationAreaWidth: width,
presentationAreaHeight: height,
};
return (
<PresentationPodsContainer {...{ presentationAreaSize, presentationIsOpen, darkTheme }} />
<PresentationPodsContainer {...{ presentationAreaSize, presentationIsOpen, darkTheme, layoutType }} />
);
};

View File

@ -3,10 +3,10 @@ import PropTypes from 'prop-types';
import { layoutSelectOutput } from '../../layout/context';
import PresentationArea from './component';
const PresentationAreaContainer = ({ presentationIsOpen, darkTheme }) => {
const PresentationAreaContainer = ({ presentationIsOpen, darkTheme, layoutType }) => {
const presentation = layoutSelectOutput((i) => i.presentation);
return <PresentationArea {...{ ...presentation, presentationIsOpen, darkTheme }} />;
return <PresentationArea {...{ ...presentation, presentationIsOpen, darkTheme, layoutType }} />;
};
export default PresentationAreaContainer;