1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

reduce direct dom access

This commit is contained in:
Luke Pulverenti 2016-08-20 17:58:28 -04:00
parent f53cb1ca8a
commit b7eaf270a1
13 changed files with 165 additions and 37 deletions

View file

@ -1,8 +1,8 @@
define(['libraryBrowser', 'cardBuilder', 'scrollStyles', 'emby-itemscontainer', 'emby-tabs', 'emby-button'], function (libraryBrowser, cardBuilder) {
define(['libraryBrowser', 'cardBuilder', 'dom', 'scrollStyles', 'emby-itemscontainer', 'emby-tabs', 'emby-button'], function (libraryBrowser, cardBuilder, dom) {
function itemsPerRow() {
var screenWidth = window.innerWidth;
var screenWidth = dom.getWindowSize().innerWidth;
return screenWidth >= 1920 ? 9 : (screenWidth >= 1200 ? 12 : (screenWidth >= 1000 ? 10 : 8));
}