Pārlūkot izejas kodu

Rename method

master
Ilya Daynatovich 8 gadus atpakaļ
vecāks
revīzija
34acadc3b5
1 mainītis faili ar 11 papildinājumiem un 9 dzēšanām
  1. 11
    9
      modules/UI/videolayout/FilmStrip.js

+ 11
- 9
modules/UI/videolayout/FilmStrip.js Parādīt failu

205
          */
205
          */
206
         let videoAreaAvailableWidth
206
         let videoAreaAvailableWidth
207
             = UIUtil.getAvailableVideoWidth()
207
             = UIUtil.getAvailableVideoWidth()
208
-            - this.getFilmstripPanelsWidth()
208
+            - this._getFilmstripWidthExceptThumbnails()
209
             - UIUtil.parseCssInt(this.filmStrip.css('right'), 10)
209
             - UIUtil.parseCssInt(this.filmStrip.css('right'), 10)
210
             - UIUtil.parseCssInt(this.filmStrip.css('paddingLeft'), 10)
210
             - UIUtil.parseCssInt(this.filmStrip.css('paddingLeft'), 10)
211
             - UIUtil.parseCssInt(this.filmStrip.css('paddingRight'), 10)
211
             - UIUtil.parseCssInt(this.filmStrip.css('paddingRight'), 10)
268
     },
268
     },
269
 
269
 
270
     /**
270
     /**
271
-     *
272
-     * Calculates width of all panels inside filmstrip
273
-     * @returns {number} width
271
+     * Traverse all elements inside the filmstrip
272
+     * and calculates the sum of all of them except
273
+     * remote videos element. Used for calculation of
274
+     * available width for video thumbnails
275
+     * @returns {number} calculated width
276
+     * @private
274
      */
277
      */
275
-    getFilmstripPanelsWidth() {
276
-        let filmstripPanelsWidth = 0;
278
+    _getFilmstripWidthExceptThumbnails() {
277
         let className = this.filmStripContainerClassName;
279
         let className = this.filmStripContainerClassName;
280
+        let width = 0;
278
         $(`.${className}`)
281
         $(`.${className}`)
279
             .children()
282
             .children()
280
             .each(function () {
283
             .each(function () {
281
                 if (this.id !== 'remoteVideos') {
284
                 if (this.id !== 'remoteVideos') {
282
-                    filmstripPanelsWidth += $(this).outerWidth();
285
+                    width += $(this).outerWidth();
283
                 }
286
                 }
284
             });
287
             });
285
-
286
-        return filmstripPanelsWidth;
288
+        return width;
287
     },
289
     },
288
 
290
 
289
     /**
291
     /**

Notiek ielāde…
Atcelt
Saglabāt