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', () => {
setTimeout(() => this.setLayoutSizes(), 200);
});
window.addEventListener('togglePresentationHide', () => {
setTimeout(() => this.setLayoutSizes(), 200);
});
}
componentDidUpdate(prevProps) {

View File

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

View File

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