Fix webcams area auto adjust when minimize presentation

This commit is contained in:
Vitor Mateus De Almeida 2020-06-17 11:53:13 -03:00
parent e09e1be1cf
commit c721e00bc3
3 changed files with 6 additions and 3 deletions

View File

@ -87,6 +87,10 @@ class LayoutManager extends Component {
window.addEventListener('slideChanged', () => { window.addEventListener('slideChanged', () => {
setTimeout(() => this.setLayoutSizes(), 200); setTimeout(() => this.setLayoutSizes(), 200);
}); });
window.addEventListener('togglePresentationHide', () => {
setTimeout(() => this.setLayoutSizes(), 200);
});
} }
componentDidUpdate(prevProps) { componentDidUpdate(prevProps) {

View File

@ -53,6 +53,7 @@ const setSwapLayout = () => {
}; };
const toggleSwapLayout = () => { const toggleSwapLayout = () => {
window.dispatchEvent(new Event('togglePresentationHide'));
swapLayout.value = !swapLayout.value; swapLayout.value = !swapLayout.value;
swapLayout.tracker.changed(); swapLayout.tracker.changed();
}; };

View File

@ -120,11 +120,9 @@ class PresentationArea extends PureComponent {
layoutContextState, layoutContextState,
} = this.props; } = this.props;
const { presentationAreaWidth, presentationAreaHeight } = this.state; const { numUsersVideo } = layoutContextState;
const { presentationAreaSize, numUsersVideo } = layoutContextState;
const { layoutContextState: prevLayoutContextState } = prevProps; const { layoutContextState: prevLayoutContextState } = prevProps;
const { const {
presentationAreaSize: prevPresentationAreaSize,
numUsersVideo: prevNumUsersVideo, numUsersVideo: prevNumUsersVideo,
} = prevLayoutContextState; } = prevLayoutContextState;