fix(tile-view, rn) Fix landscape mode tile view

This commit is contained in:
robertpin 2022-06-14 13:08:16 +03:00 committed by Saúl Ibarra Corretgé
parent f6fab051ce
commit 59ee984e09
1 changed files with 2 additions and 2 deletions

View File

@ -26,13 +26,13 @@ export function setTileViewDimensions() {
const columns = getColumnCount(state);
const rows = Math.ceil(participantCount / columns);
const conferenceBorder = conferenceStyles.conference.borderWidth || 0;
const heightToUse = height - top - (2 * conferenceBorder);
const heightToUse = height - top - bottom - (2 * conferenceBorder);
const widthToUse = width - (TILE_MARGIN * 2) - left - right - (2 * conferenceBorder);
let tileWidth;
// If there is going to be at least two rows, ensure that at least two
// rows display fully on screen.
if (rows / columns > 1) {
if (participantCount / columns > 1) {
tileWidth = Math.min(widthToUse / columns, heightToUse / 2);
} else {
tileWidth = Math.min(widthToUse / columns, heightToUse);