From 11c9f43103cf41fea9ed9881ef0e875e8c87669b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraj=20Nyi=CC=81ri?= Date: Mon, 17 Jan 2022 18:36:08 +0100 Subject: [PATCH] Fix: Horizontal mode not working when no maxRows specified or maxRows==1 --- dist/plex-meets-homeassistant.js | 2 +- src/plex-meets-homeassistant.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/plex-meets-homeassistant.js b/dist/plex-meets-homeassistant.js index 0e74174..cfa5507 100644 --- a/dist/plex-meets-homeassistant.js +++ b/dist/plex-meets-homeassistant.js @@ -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`; } diff --git a/src/plex-meets-homeassistant.ts b/src/plex-meets-homeassistant.ts index 3d20b35..30e8dff 100644 --- a/src/plex-meets-homeassistant.ts +++ b/src/plex-meets-homeassistant.ts @@ -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 {