Explorar el Código

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

master
Mihai-Andrei Uscat hace 4 años
padre
commit
d0d32b8a19
Se han modificado 1 ficheros con 6 adiciones y 6 borrados
  1. 6
    6
      react/features/filmstrip/subscriber.web.js

+ 6
- 6
react/features/filmstrip/subscriber.web.js Ver fichero

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…
Cancelar
Guardar