From 34acadc3b52dbf35e003d82ac2d3c42755217414 Mon Sep 17 00:00:00 2001 From: Ilya Daynatovich Date: Tue, 8 Nov 2016 13:10:50 +0200 Subject: [PATCH] Rename method --- modules/UI/videolayout/FilmStrip.js | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/modules/UI/videolayout/FilmStrip.js b/modules/UI/videolayout/FilmStrip.js index 3c6508882..a12cf61e2 100644 --- a/modules/UI/videolayout/FilmStrip.js +++ b/modules/UI/videolayout/FilmStrip.js @@ -205,7 +205,7 @@ const FilmStrip = { */ let videoAreaAvailableWidth = UIUtil.getAvailableVideoWidth() - - this.getFilmstripPanelsWidth() + - this._getFilmstripWidthExceptThumbnails() - UIUtil.parseCssInt(this.filmStrip.css('right'), 10) - UIUtil.parseCssInt(this.filmStrip.css('paddingLeft'), 10) - UIUtil.parseCssInt(this.filmStrip.css('paddingRight'), 10) @@ -268,22 +268,24 @@ const FilmStrip = { }, /** - * - * Calculates width of all panels inside filmstrip - * @returns {number} width + * Traverse all elements inside the filmstrip + * and calculates the sum of all of them except + * remote videos element. Used for calculation of + * available width for video thumbnails + * @returns {number} calculated width + * @private */ - getFilmstripPanelsWidth() { - let filmstripPanelsWidth = 0; + _getFilmstripWidthExceptThumbnails() { let className = this.filmStripContainerClassName; + let width = 0; $(`.${className}`) .children() .each(function () { if (this.id !== 'remoteVideos') { - filmstripPanelsWidth += $(this).outerWidth(); + width += $(this).outerWidth(); } }); - - return filmstripPanelsWidth; + return width; }, /**