From aea99b8ffbe08ec447a3311962ebc17a5c23d115 Mon Sep 17 00:00:00 2001 From: Ilya Daynatovich Date: Thu, 1 Sep 2016 08:29:41 +0300 Subject: [PATCH] Fix problem with resizing --- modules/UI/UI.js | 14 +++++++++----- modules/UI/toolbars/BottomToolbar.js | 2 +- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/modules/UI/UI.js b/modules/UI/UI.js index 2eeb5b449..65ed894f7 100644 --- a/modules/UI/UI.js +++ b/modules/UI/UI.js @@ -332,6 +332,14 @@ UI.mucJoined = function () { VideoLayout.mucJoined(); }; +/*** + * Handler for toggling filmstrip + */ +UI.handleToggleFilmStrip = () => { + UI.toggleFilmStrip(); + VideoLayout.resizeVideoArea(PanelToggler.isVisible(), true, false); +}; + /** * Setup some UI event listeners. */ @@ -359,10 +367,7 @@ function registerListeners() { UI.addListener(UIEvents.TOGGLE_CONTACT_LIST, UI.toggleContactList); - UI.addListener(UIEvents.TOGGLE_FILM_STRIP, function () { - UI.toggleFilmStrip(); - VideoLayout.resizeVideoArea(PanelToggler.isVisible(), true, false); - }); + UI.addListener(UIEvents.TOGGLE_FILM_STRIP, UI.handleToggleFilmStrip); UI.addListener(UIEvents.FOLLOW_ME_ENABLED, function (isEnabled) { if (followMeHandler) @@ -516,7 +521,6 @@ UI.start = function () { return true; }; - /** * Show local stream on UI. * @param {JitsiTrack} track stream to show diff --git a/modules/UI/toolbars/BottomToolbar.js b/modules/UI/toolbars/BottomToolbar.js index 8284c0ecd..70fc17fe2 100644 --- a/modules/UI/toolbars/BottomToolbar.js +++ b/modules/UI/toolbars/BottomToolbar.js @@ -15,7 +15,7 @@ const defaultBottomToolbarButtons = { shortcutAttr: "filmstripPopover", shortcutFunc: function() { JitsiMeetJS.analytics.sendEvent("shortcut.film.toggled"); - APP.UI.toggleFilmStrip(); + APP.UI.handleToggleFilmStrip(); }, shortcutDescription: "keyboardShortcuts.toggleFilmstrip" }