diff --git a/bigbluebutton-html5/imports/ui/components/layout/layout-manager.jsx b/bigbluebutton-html5/imports/ui/components/layout/layout-manager.jsx index 694cc489b7..bce9a01f2b 100644 --- a/bigbluebutton-html5/imports/ui/components/layout/layout-manager.jsx +++ b/bigbluebutton-html5/imports/ui/components/layout/layout-manager.jsx @@ -87,6 +87,10 @@ class LayoutManager extends Component { window.addEventListener('slideChanged', () => { setTimeout(() => this.setLayoutSizes(), 200); }); + + window.addEventListener('togglePresentationHide', () => { + setTimeout(() => this.setLayoutSizes(), 200); + }); } componentDidUpdate(prevProps) { diff --git a/bigbluebutton-html5/imports/ui/components/media/service.js b/bigbluebutton-html5/imports/ui/components/media/service.js index 9811280c05..d8d1906839 100755 --- a/bigbluebutton-html5/imports/ui/components/media/service.js +++ b/bigbluebutton-html5/imports/ui/components/media/service.js @@ -53,6 +53,7 @@ const setSwapLayout = () => { }; const toggleSwapLayout = () => { + window.dispatchEvent(new Event('togglePresentationHide')); swapLayout.value = !swapLayout.value; swapLayout.tracker.changed(); }; diff --git a/bigbluebutton-html5/imports/ui/components/presentation/component.jsx b/bigbluebutton-html5/imports/ui/components/presentation/component.jsx index 146c1d9c4a..fa2ada7169 100755 --- a/bigbluebutton-html5/imports/ui/components/presentation/component.jsx +++ b/bigbluebutton-html5/imports/ui/components/presentation/component.jsx @@ -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;