From a9e8b570f4723b7a1eca3bc00153fe01a60cd75c Mon Sep 17 00:00:00 2001 From: Robert Long Date: Tue, 31 Aug 2021 12:15:03 -0700 Subject: [PATCH] Fix grid padding --- src/VideoGrid.jsx | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/VideoGrid.jsx b/src/VideoGrid.jsx index e08a5878..0af45e20 100644 --- a/src/VideoGrid.jsx +++ b/src/VideoGrid.jsx @@ -85,9 +85,9 @@ function getTilePositions( if (layoutDirection === "vertical") { presenterGridWidth = gridWidth; - presenterGridHeight = gridHeight - participantGridBounds.height; + presenterGridHeight = gridHeight - (participantGridBounds.height + gap); } else { - presenterGridWidth = gridWidth - participantGridBounds.width; + presenterGridWidth = gridWidth - (participantGridBounds.width + gap); presenterGridHeight = gridHeight; } @@ -100,24 +100,17 @@ function getTilePositions( const presenterGridBounds = getSubGridBoundingBox(presenterGridPositions); if (layoutDirection === "vertical") { - centerTiles( - participantGridPositions, - gridWidth, - presenterGridBounds.height - ); applyTileOffsets( participantGridPositions, 0, presenterGridBounds.height + gap ); - centerTiles(presenterGridPositions, gridWidth, presenterGridBounds.height); } else { applyTileOffsets( participantGridPositions, presenterGridBounds.width + gap, 0 ); - centerTiles(presenterGridPositions, presenterGridBounds.width, gridHeight); } const tilePositions = [ @@ -667,6 +660,7 @@ function ParticipantTile({ style, participant, remove, + presenter, onClickNameTag, ...rest }) {