Selaa lähdekoodia

Merge pull request #1149 from jitsi/ss_resize

Fixes issue with not resizing properly if SS is on and the filmstrip is hidden
master
Paweł Domas 8 vuotta sitten
vanhempi
commit
d900d3c3fd
1 muutettua tiedostoa jossa 17 lisäystä ja 8 poistoa
  1. 17
    8
      modules/UI/videolayout/FilmStrip.js

+ 17
- 8
modules/UI/videolayout/FilmStrip.js Näytä tiedosto

57
      * Attach 'click' listener to "hide filmstrip" button
57
      * Attach 'click' listener to "hide filmstrip" button
58
      */
58
      */
59
     registerListeners() {
59
     registerListeners() {
60
-        let toggleFilmstripMethod = this.toggleFilmStrip.bind(this);
61
-        let selector = '#hideVideoToolbar';
62
-        $('#videospace').on('click', selector, toggleFilmstripMethod);
60
+        // Important:
61
+        // Firing the event instead of executing toggleFilmstrip method because
62
+        // it's important to hide the filmstrip by UI.toggleFilmstrip in order
63
+        // to correctly resize the video area.
64
+        $('#hideVideoToolbar').on('click',
65
+            () => this.eventEmitter.emit(UIEvents.TOGGLE_FILM_STRIP));
63
 
66
 
64
         this._registerToggleFilmstripShortcut();
67
         this._registerToggleFilmstripShortcut();
65
     },
68
     },
72
         let shortcut = 'F';
75
         let shortcut = 'F';
73
         let shortcutAttr = 'filmstripPopover';
76
         let shortcutAttr = 'filmstripPopover';
74
         let description = 'keyboardShortcuts.toggleFilmstrip';
77
         let description = 'keyboardShortcuts.toggleFilmstrip';
75
-        let handler = () => {
76
-            JitsiMeetJS.analytics.sendEvent('toolbar.filmstrip.toggled');
77
-            this.eventEmitter.emit(UIEvents.TOGGLE_FILM_STRIP);
78
-        };
78
+        // Important:
79
+        // Firing the event instead of executing toggleFilmstrip method because
80
+        // it's important to hide the filmstrip by UI.toggleFilmstrip in order
81
+        // to correctly resize the video area.
82
+        let handler = () => this.eventEmitter.emit(UIEvents.TOGGLE_FILM_STRIP);
79
 
83
 
80
         APP.keyboardshortcut.registerShortcut(
84
         APP.keyboardshortcut.registerShortcut(
81
             shortcut,
85
             shortcut,
110
      * of the film strip. If not specified, the visibility will be flipped
114
      * of the film strip. If not specified, the visibility will be flipped
111
      * (i.e. toggled); otherwise, the visibility will be set to the specified
115
      * (i.e. toggled); otherwise, the visibility will be set to the specified
112
      * value.
116
      * value.
117
+     *
118
+     * Note:
119
+     * This method shouldn't be executed directly to hide the filmstrip.
120
+     * It's important to hide the filmstrip with UI.toggleFilmstrip in order
121
+     * to correctly resize the video area.
113
      */
122
      */
114
     toggleFilmStrip(visible) {
123
     toggleFilmStrip(visible) {
115
         let isVisibleDefined = typeof visible === 'boolean';
124
         let isVisibleDefined = typeof visible === 'boolean';
118
         } else if (this.isFilmStripVisible() === visible) {
127
         } else if (this.isFilmStripVisible() === visible) {
119
             return;
128
             return;
120
         }
129
         }
121
-
130
+        JitsiMeetJS.analytics.sendEvent('toolbar.filmstrip.toggled');
122
         this.filmStrip.toggleClass("hidden");
131
         this.filmStrip.toggleClass("hidden");
123
 
132
 
124
         if (!visible) {
133
         if (!visible) {

Loading…
Peruuta
Tallenna