Fix presenter aspect ratio when only presenters or when multiple presenters
This commit is contained in:
parent
c094e820d1
commit
9909fa7ebb
1 changed files with 2 additions and 2 deletions
|
@ -53,7 +53,7 @@ function getTilePositions(tileCount, gridBounds, presenterTileCount) {
|
||||||
const gridHeight = gridBounds.height;
|
const gridHeight = gridBounds.height;
|
||||||
const gridAspectRatio = gridWidth / gridHeight;
|
const gridAspectRatio = gridWidth / gridHeight;
|
||||||
|
|
||||||
if (presenterTileCount) {
|
if (presenterTileCount && presenterTileCount !== tileCount) {
|
||||||
const subGridTileCount = tileCount - presenterTileCount;
|
const subGridTileCount = tileCount - presenterTileCount;
|
||||||
|
|
||||||
let presenterGridWidth,
|
let presenterGridWidth,
|
||||||
|
@ -172,7 +172,7 @@ function getTilePositions(tileCount, gridBounds, presenterTileCount) {
|
||||||
presenterGridHeight = gridHeight;
|
presenterGridHeight = gridHeight;
|
||||||
presenterColumnCount = 1;
|
presenterColumnCount = 1;
|
||||||
presenterRowCount = presenterTileCount;
|
presenterRowCount = presenterTileCount;
|
||||||
presenterTileAspectRatio = 0;
|
presenterTileAspectRatio = presenterTileCount === 1 ? 0 : 16 / 9;
|
||||||
|
|
||||||
subGridWidth = gridWidth - presenterGridWidth;
|
subGridWidth = gridWidth - presenterGridWidth;
|
||||||
subGridHeight = gridHeight;
|
subGridHeight = gridHeight;
|
||||||
|
|
Loading…
Reference in a new issue