Merge pull request #356 from ONLYOFFICE/bugfix/selection-area
Web: Files: Selection-area: fixed tile selection
This commit is contained in:
commit
62a1c4e57d
@ -3962,11 +3962,21 @@ class FilesStore {
|
||||
const tileGap = isDesktopView ? 16 : 14;
|
||||
const minTileWidth = 216 + tileGap;
|
||||
const body = document.getElementById("section");
|
||||
const tileContainer = document.getElementById("tileContainer");
|
||||
|
||||
const sectionPadding =
|
||||
body?.offsetWidth - tileContainer?.clientWidth - tileGap + 1;
|
||||
const elem = document.getElementsByClassName("section-wrapper-content")[0];
|
||||
let containerWidth = 0;
|
||||
if (elem) {
|
||||
const elemPadding = window
|
||||
.getComputedStyle(elem)
|
||||
?.getPropertyValue("padding");
|
||||
|
||||
containerWidth =
|
||||
elem?.clientWidth -
|
||||
elemPadding.split("px")[1] -
|
||||
elemPadding.split("px")[3];
|
||||
}
|
||||
|
||||
const sectionPadding = body?.offsetWidth - containerWidth - tileGap + 1;
|
||||
const sectionWidth = body ? body.offsetWidth - sectionPadding : 0;
|
||||
|
||||
return Math.floor(sectionWidth / minTileWidth);
|
||||
|
Loading…
Reference in New Issue
Block a user