Fix zero participant tiles case
This commit is contained in:
parent
c8192ac48c
commit
09d726a5a8
1 changed files with 9 additions and 3 deletions
|
@ -69,8 +69,10 @@ function getTilePositions(
|
||||||
participantGridHeight = gridHeight;
|
participantGridHeight = gridHeight;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const participantTileCount = tileCount - presenterTileCount;
|
||||||
|
|
||||||
const participantGridPositions = getSubGridPositions(
|
const participantGridPositions = getSubGridPositions(
|
||||||
tileCount - presenterTileCount,
|
participantTileCount,
|
||||||
participantGridWidth,
|
participantGridWidth,
|
||||||
participantGridHeight,
|
participantGridHeight,
|
||||||
gap
|
gap
|
||||||
|
@ -84,9 +86,13 @@ function getTilePositions(
|
||||||
presenterGridHeight = 0;
|
presenterGridHeight = 0;
|
||||||
} else if (layoutDirection === "vertical") {
|
} else if (layoutDirection === "vertical") {
|
||||||
presenterGridWidth = gridWidth;
|
presenterGridWidth = gridWidth;
|
||||||
presenterGridHeight = gridHeight - (participantGridBounds.height + gap * 2);
|
presenterGridHeight =
|
||||||
|
gridHeight -
|
||||||
|
(participantGridBounds.height + (participantTileCount ? gap * 2 : 0));
|
||||||
} else {
|
} else {
|
||||||
presenterGridWidth = gridWidth - (participantGridBounds.width + gap * 2);
|
presenterGridWidth =
|
||||||
|
gridWidth -
|
||||||
|
(participantGridBounds.width + (participantTileCount ? gap * 2 : 0));
|
||||||
presenterGridHeight = gridHeight;
|
presenterGridHeight = gridHeight;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue