Fix: Horizontal mode not working when no maxRows specified or maxRows==1

pull/72/head
Juraj Nyíri 2 years ago
parent 1ced6d8db3
commit 11c9f43103

@ -22435,7 +22435,7 @@ class PlexMeetsHomeAssistant extends HTMLElement {
movieElem.style.clear = 'both';
}
const marginRight = 10;
if (this.renderedRows === 1) {
if (this.renderedRows === 1 || !this.maxRows || this.maxRows < 2) {
if (lodash.isEmpty(this.contentContainer.style.width)) {
this.contentContainer.style.width = `${parseFloat(movieElem.style.width) + marginRight}px`;
}

@ -669,7 +669,7 @@ class PlexMeetsHomeAssistant extends HTMLElement {
movieElem.style.clear = 'both';
}
const marginRight = 10;
if (this.renderedRows === 1) {
if (this.renderedRows === 1 || !this.maxRows || this.maxRows < 2) {
if (_.isEmpty(this.contentContainer.style.width)) {
this.contentContainer.style.width = `${parseFloat(movieElem.style.width) + marginRight}px`;
} else {

Loading…
Cancel
Save