소스 검색

fix(responsive): Fix tiles not recomputing when jumping between screen sizes

master
Mihai-Andrei Uscat 4 년 전
부모
커밋
d0d32b8a19
1개의 변경된 파일6개의 추가작업 그리고 6개의 파일을 삭제
  1. 6
    6
      react/features/filmstrip/subscriber.web.js

+ 6
- 6
react/features/filmstrip/subscriber.web.js 파일 보기

152
  * Symbol mapping used for the tile view responsiveness computation.
152
  * Symbol mapping used for the tile view responsiveness computation.
153
  */
153
  */
154
 const responsiveColumnMapping = {
154
 const responsiveColumnMapping = {
155
+    multipleColumns: Symbol('multipleColumns'),
155
     singleColumn: Symbol('singleColumn'),
156
     singleColumn: Symbol('singleColumn'),
156
     twoColumns: Symbol('twoColumns'),
157
     twoColumns: Symbol('twoColumns'),
157
     twoParticipantsSingleColumn: Symbol('twoParticipantsSingleColumn')
158
     twoParticipantsSingleColumn: Symbol('twoParticipantsSingleColumn')
173
             // Forcing the recomputation of tiles when screen switches in or out of
174
             // Forcing the recomputation of tiles when screen switches in or out of
174
             // the (ASPECT_RATIO_BREAKPOINT, SINGLE_COLUMN_BREAKPOINT] interval.
175
             // the (ASPECT_RATIO_BREAKPOINT, SINGLE_COLUMN_BREAKPOINT] interval.
175
             return responsiveColumnMapping.twoParticipantsSingleColumn;
176
             return responsiveColumnMapping.twoParticipantsSingleColumn;
177
+        } else if (clientWidth < SINGLE_COLUMN_BREAKPOINT) {
178
+            // Forcing the recomputation of tiles when screen switches below SINGLE_COLUMN_BREAKPOINT.
179
+            return responsiveColumnMapping.singleColumn;
176
         }
180
         }
177
 
181
 
178
-        /**
179
-         * This gets called either when the width of the screen is above {@code TWO_COLUMN_BREAKPOINT}
180
-         * or below {@CODE SINGLE_COLUMN_BREAKPOINT}, however, the internal logic from {@code getMaxColumnCount}
181
-         * only takes the second case into consideration.
182
-         */
183
-        return responsiveColumnMapping.singleColumn;
182
+        // Forcing the recomputation of tiles when screen switches above TWO_COLUMN_BREAKPOINT.
183
+        return responsiveColumnMapping.multipleColumns;
184
     },
184
     },
185
     /* listener */ (_, store) => {
185
     /* listener */ (_, store) => {
186
         const state = store.getState();
186
         const state = store.getState();

Loading…
취소
저장