Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: setPresentationIsOpen is undefined #16545

Merged
merged 1 commit into from
Jan 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import AnnotationGroupContainer from '../whiteboard/annotation-group/container';
import PresentationOverlayContainer from './presentation-overlay/container';
import Slide from './slide/component';
import Styled from './styles';
import MediaService, { shouldEnableSwapLayout } from '../media/service';
import MediaService from '../media/service';
// import PresentationCloseButton from './presentation-close-button/component';
import DownloadPresentationButton from './download-presentation-button/component';
import FullscreenService from '/imports/ui/components/common/fullscreen-button/service';
Expand Down Expand Up @@ -891,7 +891,6 @@ class Presentation extends PureComponent {
tldrawAPI={this.state.tldrawAPI}
elementName={intl.formatMessage(intlMessages.presentationLabel)}
elementId={fullscreenElementId}
toggleSwapLayout={MediaService.toggleSwapLayout}
layoutContextDispatch={layoutContextDispatch}
/>
);
Expand All @@ -913,7 +912,6 @@ class Presentation extends PureComponent {
layoutType,
numCameras,
currentPresentation,
layoutSwapped,
podId,
intl,
isViewersCursorLocked,
Expand Down Expand Up @@ -993,7 +991,7 @@ class Presentation extends PureComponent {
right: presentationBounds.right,
width: presentationBounds.width,
height: presentationBounds.height,
display: layoutSwapped ? 'none' : 'flex',
display: !presentationIsOpen ? 'none' : 'flex',
overflow: 'hidden',
zIndex: fullscreenContext ? presentationBounds.zIndex : undefined,
background: layoutType === LAYOUT_TYPE.VIDEO_FOCUS && numCameras > 0 && !fullscreenContext
Expand Down Expand Up @@ -1113,6 +1111,7 @@ Presentation.propTypes = {
}),
// current multi-user status
multiUser: PropTypes.bool.isRequired,
setPresentationIsOpen: PropTypes.func.isRequired,
};

Presentation.defaultProps = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import {
import lockContextContainer from "/imports/ui/components/lock-viewers/context/container";
import WhiteboardService from '/imports/ui/components/whiteboard/service';
import { DEVICE_TYPE } from '../layout/enums';
import MediaService from '../media/service';

const PresentationContainer = ({ presentationIsOpen, presentationPodIds, mountPresentation, ...props }) => {

Expand Down Expand Up @@ -139,5 +140,6 @@ export default lockContextContainer(
multiUserSize: WhiteboardService.getMultiUserSize(currentSlide?.id),
isViewersCursorLocked,
clearFakeAnnotations: WhiteboardService.clearFakeAnnotations,
setPresentationIsOpen: MediaService.setPresentationIsOpen,
};
})(PresentationContainer));