No blank space in sidebar
This commit is contained in:
parent
b91e766184
commit
eb9b12a581
@ -212,14 +212,21 @@ const CustomLayout = (props) => {
|
||||
};
|
||||
|
||||
const calculatesSidebarContentHeight = (cameraDockHeight) => {
|
||||
const { isOpen } = presentationInput;
|
||||
const { isOpen, slidesLength } = presentationInput;
|
||||
const { hasExternalVideo } = externalVideoInput;
|
||||
const { hasScreenShare } = screenShareInput;
|
||||
const { isPinned: isSharedNotesPinned } = sharedNotesInput;
|
||||
|
||||
const hasPresentation = isPresentationEnabled() && slidesLength !== 0
|
||||
const isGeneralMediaOff = !hasPresentation && !hasExternalVideo && !hasScreenShare && !isSharedNotesPinned;
|
||||
|
||||
let sidebarContentHeight = 0;
|
||||
if (sidebarContentInput.isOpen) {
|
||||
if (isMobile) {
|
||||
sidebarContentHeight = windowHeight() - DEFAULT_VALUES.navBarHeight;
|
||||
} else if (cameraDockInput.numCameras > 0
|
||||
&& cameraDockInput.position === CAMERADOCK_POSITION.SIDEBAR_CONTENT_BOTTOM
|
||||
&& isOpen) {
|
||||
&& isOpen && !isGeneralMediaOff) {
|
||||
sidebarContentHeight = windowHeight() - cameraDockHeight;
|
||||
} else {
|
||||
sidebarContentHeight = windowHeight();
|
||||
|
@ -8,6 +8,7 @@ import {
|
||||
PANELS,
|
||||
CAMERADOCK_POSITION,
|
||||
} from '/imports/ui/components/layout/enums';
|
||||
import { isPresentationEnabled } from '/imports/ui/services/features';
|
||||
|
||||
const windowWidth = () => window.document.documentElement.clientWidth;
|
||||
const windowHeight = () => window.document.documentElement.clientHeight;
|
||||
@ -33,6 +34,10 @@ const PresentationFocusLayout = (props) => {
|
||||
const currentPanelType = layoutSelect((i) => i.currentPanelType);
|
||||
|
||||
const presentationInput = layoutSelectInput((i) => i.presentation);
|
||||
const externalVideoInput = layoutSelectInput((i) => i.externalVideo);
|
||||
const screenShareInput = layoutSelectInput((i) => i.screenShare);
|
||||
const sharedNotesInput = layoutSelectInput((i) => i.sharedNotes);
|
||||
|
||||
const sidebarNavigationInput = layoutSelectInput((i) => i.sidebarNavigation);
|
||||
const sidebarContentInput = layoutSelectInput((i) => i.sidebarContent);
|
||||
const cameraDockInput = layoutSelectInput((i) => i.cameraDock);
|
||||
@ -147,7 +152,14 @@ const PresentationFocusLayout = (props) => {
|
||||
};
|
||||
|
||||
const calculatesSidebarContentHeight = () => {
|
||||
const { isOpen } = presentationInput;
|
||||
const { isOpen, slidesLength } = presentationInput;
|
||||
const { hasExternalVideo } = externalVideoInput;
|
||||
const { hasScreenShare } = screenShareInput;
|
||||
const { isPinned: isSharedNotesPinned } = sharedNotesInput;
|
||||
|
||||
const hasPresentation = isPresentationEnabled() && slidesLength !== 0
|
||||
const isGeneralMediaOff = !hasPresentation && !hasExternalVideo && !hasScreenShare && !isSharedNotesPinned;
|
||||
|
||||
const {
|
||||
navBarHeight,
|
||||
sidebarContentMinHeight,
|
||||
@ -160,7 +172,7 @@ const PresentationFocusLayout = (props) => {
|
||||
height = windowHeight() - navBarHeight - bannerAreaHeight();
|
||||
minHeight = height;
|
||||
maxHeight = height;
|
||||
} else if (cameraDockInput.numCameras > 0 && isOpen) {
|
||||
} else if (cameraDockInput.numCameras > 0 && isOpen && !isGeneralMediaOff) {
|
||||
if (sidebarContentInput.height === 0) {
|
||||
height = (windowHeight() * 0.75) - bannerAreaHeight();
|
||||
} else {
|
||||
|
@ -9,6 +9,7 @@ import {
|
||||
import DEFAULT_VALUES from '/imports/ui/components/layout/defaultValues';
|
||||
import { INITIAL_INPUT_STATE } from '/imports/ui/components/layout/initState';
|
||||
import { ACTIONS, PANELS } from '/imports/ui/components/layout/enums';
|
||||
import { isPresentationEnabled } from '/imports/ui/services/features';
|
||||
|
||||
const windowWidth = () => window.document.documentElement.clientWidth;
|
||||
const windowHeight = () => window.document.documentElement.clientHeight;
|
||||
@ -32,6 +33,10 @@ const VideoFocusLayout = (props) => {
|
||||
const currentPanelType = layoutSelect((i) => i.currentPanelType);
|
||||
|
||||
const presentationInput = layoutSelectInput((i) => i.presentation);
|
||||
const externalVideoInput = layoutSelectInput((i) => i.externalVideo);
|
||||
const screenShareInput = layoutSelectInput((i) => i.screenShare);
|
||||
const sharedNotesInput = layoutSelectInput((i) => i.sharedNotes);
|
||||
|
||||
const sidebarNavigationInput = layoutSelectInput((i) => i.sidebarNavigation);
|
||||
const sidebarContentInput = layoutSelectInput((i) => i.sidebarContent);
|
||||
const cameraDockInput = layoutSelectInput((i) => i.cameraDock);
|
||||
@ -154,6 +159,14 @@ const VideoFocusLayout = (props) => {
|
||||
};
|
||||
|
||||
const calculatesSidebarContentHeight = () => {
|
||||
const { isOpen, slidesLength } = presentationInput;
|
||||
const { hasExternalVideo } = externalVideoInput;
|
||||
const { hasScreenShare } = screenShareInput;
|
||||
const { isPinned: isSharedNotesPinned } = sharedNotesInput;
|
||||
|
||||
const hasPresentation = isPresentationEnabled() && slidesLength !== 0
|
||||
const isGeneralMediaOff = !hasPresentation && !hasExternalVideo && !hasScreenShare && !isSharedNotesPinned;
|
||||
|
||||
let minHeight = 0;
|
||||
let height = 0;
|
||||
let maxHeight = 0;
|
||||
@ -162,7 +175,7 @@ const VideoFocusLayout = (props) => {
|
||||
height = windowHeight() - DEFAULT_VALUES.navBarHeight - bannerAreaHeight();
|
||||
minHeight = height;
|
||||
maxHeight = height;
|
||||
} else if (cameraDockInput.numCameras > 0 && presentationInput.isOpen) {
|
||||
} else if (cameraDockInput.numCameras > 0 && isOpen && !isGeneralMediaOff) {
|
||||
if (sidebarContentInput.height > 0 && sidebarContentInput.height < windowHeight()) {
|
||||
height = sidebarContentInput.height - bannerAreaHeight();
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user