Fix: Case where horizontal scroll width was incorrectly calculated

maxHorizontalRows
Juraj Nyíri 3 years ago
parent 9e006ae6fa
commit 77702913a4

@ -22429,7 +22429,7 @@ class PlexMeetsHomeAssistant extends HTMLElement {
movieElem.style.clear = 'both'; movieElem.style.clear = 'both';
} }
const marginRight = 10; const marginRight = 10;
if (this.renderedRows < 2 || !this.maxRows || this.maxRows < 2) { if (this.renderedRows === 1 || !this.maxRows || this.maxRows < 2) {
containerWidth += parseFloat(movieElem.style.width) + marginRight; containerWidth += parseFloat(movieElem.style.width) + marginRight;
} }
} }

@ -667,7 +667,7 @@ class PlexMeetsHomeAssistant extends HTMLElement {
movieElem.style.clear = 'both'; movieElem.style.clear = 'both';
} }
const marginRight = 10; const marginRight = 10;
if (this.renderedRows < 2 || !this.maxRows || this.maxRows < 2) { if (this.renderedRows === 1 || !this.maxRows || this.maxRows < 2) {
containerWidth += parseFloat(movieElem.style.width) + marginRight; containerWidth += parseFloat(movieElem.style.width) + marginRight;
} }
} }

Loading…
Cancel
Save