Fix grid padding
This commit is contained in:
parent
e7a2c500a0
commit
a9e8b570f4
1 changed files with 3 additions and 9 deletions
|
@ -85,9 +85,9 @@ function getTilePositions(
|
||||||
|
|
||||||
if (layoutDirection === "vertical") {
|
if (layoutDirection === "vertical") {
|
||||||
presenterGridWidth = gridWidth;
|
presenterGridWidth = gridWidth;
|
||||||
presenterGridHeight = gridHeight - participantGridBounds.height;
|
presenterGridHeight = gridHeight - (participantGridBounds.height + gap);
|
||||||
} else {
|
} else {
|
||||||
presenterGridWidth = gridWidth - participantGridBounds.width;
|
presenterGridWidth = gridWidth - (participantGridBounds.width + gap);
|
||||||
presenterGridHeight = gridHeight;
|
presenterGridHeight = gridHeight;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -100,24 +100,17 @@ function getTilePositions(
|
||||||
const presenterGridBounds = getSubGridBoundingBox(presenterGridPositions);
|
const presenterGridBounds = getSubGridBoundingBox(presenterGridPositions);
|
||||||
|
|
||||||
if (layoutDirection === "vertical") {
|
if (layoutDirection === "vertical") {
|
||||||
centerTiles(
|
|
||||||
participantGridPositions,
|
|
||||||
gridWidth,
|
|
||||||
presenterGridBounds.height
|
|
||||||
);
|
|
||||||
applyTileOffsets(
|
applyTileOffsets(
|
||||||
participantGridPositions,
|
participantGridPositions,
|
||||||
0,
|
0,
|
||||||
presenterGridBounds.height + gap
|
presenterGridBounds.height + gap
|
||||||
);
|
);
|
||||||
centerTiles(presenterGridPositions, gridWidth, presenterGridBounds.height);
|
|
||||||
} else {
|
} else {
|
||||||
applyTileOffsets(
|
applyTileOffsets(
|
||||||
participantGridPositions,
|
participantGridPositions,
|
||||||
presenterGridBounds.width + gap,
|
presenterGridBounds.width + gap,
|
||||||
0
|
0
|
||||||
);
|
);
|
||||||
centerTiles(presenterGridPositions, presenterGridBounds.width, gridHeight);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const tilePositions = [
|
const tilePositions = [
|
||||||
|
@ -667,6 +660,7 @@ function ParticipantTile({
|
||||||
style,
|
style,
|
||||||
participant,
|
participant,
|
||||||
remove,
|
remove,
|
||||||
|
presenter,
|
||||||
onClickNameTag,
|
onClickNameTag,
|
||||||
...rest
|
...rest
|
||||||
}) {
|
}) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue