Web: Files: fixed tile view

This commit is contained in:
Nikita Gopienko 2024-04-15 16:29:02 +03:00
parent bbc90ac41b
commit ac1236fe47

View File

@ -3961,9 +3961,12 @@ class FilesStore {
const isDesktopView = isDesktop();
const tileGap = isDesktopView ? 16 : 14;
const minTileWidth = 216 + tileGap;
const sectionPadding = isDesktopView ? 24 : 16;
const body = document.getElementById("section");
const tileContainer = document.getElementById("tileContainer");
const sectionPadding =
body?.offsetWidth - tileContainer?.clientWidth - tileGap + 1;
const sectionWidth = body ? body.offsetWidth - sectionPadding : 0;
return Math.floor(sectionWidth / minTileWidth);