fix(filmstrip): scroll

Add SS tiles to the number of participants in scroll calculations. This
fixes an issue where the scroll is not displayed if there is a SS tile
and only part of 1 tile is overflowing.
pull/12717/head jitsi-meet_8178
Hristo Terezov 2 years ago
parent 580f56010a
commit 27754c8874
  1. 4
      react/features/base/participants/functions.ts
  2. 6
      react/features/filmstrip/actions.web.ts

@ -351,11 +351,11 @@ export function isWhiteboardParticipant(participant?: IParticipant): boolean {
* features/base/participants. * features/base/participants.
* @returns {number} * @returns {number}
*/ */
export function getRemoteParticipantCount(stateful: IStateful) { export function getRemoteParticipantCountWithFake(stateful: IStateful) {
const state = toState(stateful); const state = toState(stateful);
const participantsState = state['features/base/participants']; const participantsState = state['features/base/participants'];
return participantsState.remote.size - participantsState.sortedRemoteVirtualScreenshareParticipants.size; return participantsState.remote.size;
} }
/** /**

@ -3,7 +3,7 @@ import { pinParticipant } from '../base/participants/actions';
import { import {
getLocalParticipant, getLocalParticipant,
getParticipantById, getParticipantById,
getRemoteParticipantCount getRemoteParticipantCountWithFake
} from '../base/participants/functions'; } from '../base/participants/functions';
import { shouldHideSelfView } from '../base/settings/functions.web'; import { shouldHideSelfView } from '../base/settings/functions.web';
import { getMaxColumnCount } from '../video-layout/functions.web'; import { getMaxColumnCount } from '../video-layout/functions.web';
@ -149,7 +149,7 @@ export function setVerticalViewDimensions() {
const disableSelfView = shouldHideSelfView(state); const disableSelfView = shouldHideSelfView(state);
const resizableFilmstrip = isFilmstripResizable(state); const resizableFilmstrip = isFilmstripResizable(state);
const _verticalViewGrid = showGridInVerticalView(state); const _verticalViewGrid = showGridInVerticalView(state);
const numberOfRemoteParticipants = getRemoteParticipantCount(state); const numberOfRemoteParticipants = getRemoteParticipantCountWithFake(state);
const { localScreenShare } = state['features/base/participants']; const { localScreenShare } = state['features/base/participants'];
let gridView = {}; let gridView = {};
@ -261,7 +261,7 @@ export function setHorizontalViewDimensions() {
= clientWidth - (disableSelfView ? 0 : thumbnails?.local?.width) - HORIZONTAL_FILMSTRIP_MARGIN; = clientWidth - (disableSelfView ? 0 : thumbnails?.local?.width) - HORIZONTAL_FILMSTRIP_MARGIN;
const remoteVideosContainerHeight const remoteVideosContainerHeight
= thumbnails?.local?.height + TILE_VERTICAL_MARGIN + STAGE_VIEW_THUMBNAIL_VERTICAL_BORDER + SCROLL_SIZE; = thumbnails?.local?.height + TILE_VERTICAL_MARGIN + STAGE_VIEW_THUMBNAIL_VERTICAL_BORDER + SCROLL_SIZE;
const numberOfRemoteParticipants = getRemoteParticipantCount(state); const numberOfRemoteParticipants = getRemoteParticipantCountWithFake(state);
const hasScroll const hasScroll
= remoteVideosContainerHeight = remoteVideosContainerHeight
< (thumbnails?.remote.width + TILE_HORIZONTAL_MARGIN) * numberOfRemoteParticipants; < (thumbnails?.remote.width + TILE_HORIZONTAL_MARGIN) * numberOfRemoteParticipants;

Loading…
Cancel
Save