fix sidebar content when presentation is hidden
This commit is contained in:
parent
3065597635
commit
0f2ae0425c
@ -350,12 +350,15 @@ class CustomLayout extends Component {
|
||||
calculatesSidebarContentHeight(cameraDockHeight) {
|
||||
const { newLayoutContextState } = this.props;
|
||||
const { deviceType, input } = newLayoutContextState;
|
||||
const { presentation } = input;
|
||||
const { isOpen } = presentation;
|
||||
let sidebarContentHeight = 0;
|
||||
if (input.sidebarContent.isOpen) {
|
||||
if (deviceType === DEVICE_TYPE.MOBILE) {
|
||||
sidebarContentHeight = this.mainHeight() - DEFAULT_VALUES.navBarHeight;
|
||||
} else if (input.cameraDock.numCameras > 0
|
||||
&& input.cameraDock.position === CAMERADOCK_POSITION.SIDEBAR_CONTENT_BOTTOM) {
|
||||
&& input.cameraDock.position === CAMERADOCK_POSITION.SIDEBAR_CONTENT_BOTTOM
|
||||
&& isOpen) {
|
||||
sidebarContentHeight = this.mainHeight() - cameraDockHeight;
|
||||
} else {
|
||||
sidebarContentHeight = this.mainHeight();
|
||||
|
@ -289,8 +289,9 @@ class VideoFocusLayout extends Component {
|
||||
const { newLayoutContextState } = this.props;
|
||||
const { deviceType, input, output } = newLayoutContextState;
|
||||
const { sidebarContentMinHeight } = DEFAULT_VALUES;
|
||||
const { sidebarContent: inputContent } = input;
|
||||
const { sidebarContent: inputContent, presentation } = input;
|
||||
const { sidebarContent: outputContent } = output;
|
||||
const { isOpen } = presentation;
|
||||
let minHeight = 0;
|
||||
let height = 0;
|
||||
let maxHeight = 0;
|
||||
@ -300,7 +301,7 @@ class VideoFocusLayout extends Component {
|
||||
minHeight = this.mainHeight() - this.bannerAreaHeight();
|
||||
maxHeight = this.mainHeight() - this.bannerAreaHeight();
|
||||
} else {
|
||||
if (input.cameraDock.numCameras > 0) {
|
||||
if (input.cameraDock.numCameras > 0 && isOpen) {
|
||||
if (inputContent.height > 0 && inputContent.height < this.mainHeight()) {
|
||||
height = inputContent.height - this.bannerAreaHeight();
|
||||
maxHeight = this.mainHeight() - this.bannerAreaHeight();
|
||||
|
Loading…
Reference in New Issue
Block a user