From c91f41e1002b369f7e95468d14f52a6501563ba0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraj=20Nyi=CC=81ri?= Date: Tue, 19 Oct 2021 15:19:20 +0200 Subject: [PATCH] Update: Move title to left if image is missing for opened active item --- dist/plex-meets-homeassistant.js | 7 ++++++- src/plex-meets-homeassistant.ts | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/dist/plex-meets-homeassistant.js b/dist/plex-meets-homeassistant.js index 64c9c46..2853fb3 100644 --- a/dist/plex-meets-homeassistant.js +++ b/dist/plex-meets-homeassistant.js @@ -22819,7 +22819,12 @@ class PlexMeetsHomeAssistant extends HTMLElement { } this.detailElem.style.transition = '0s'; this.detailElem.style.top = `${top - 1000}px`; - this.detailElem.style.left = `${this.minExpandedWidth + 30}px`; + if (!lodash.isEmpty(lodash.get(data, 'thumb'))) { + this.detailElem.style.left = `${this.minExpandedWidth + 30}px`; + } + else { + this.detailElem.style.left = `16px`; + } clearInterval(this.showDetailsTimeout); // eslint-disable-next-line @typescript-eslint/no-misused-promises this.showDetailsTimeout = setTimeout(async () => { diff --git a/src/plex-meets-homeassistant.ts b/src/plex-meets-homeassistant.ts index 6b79cfd..561361e 100644 --- a/src/plex-meets-homeassistant.ts +++ b/src/plex-meets-homeassistant.ts @@ -1185,7 +1185,12 @@ class PlexMeetsHomeAssistant extends HTMLElement { this.detailElem.style.transition = '0s'; this.detailElem.style.top = `${top - 1000}px`; - this.detailElem.style.left = `${this.minExpandedWidth + 30}px`; + if (!_.isEmpty(_.get(data, 'thumb'))) { + this.detailElem.style.left = `${this.minExpandedWidth + 30}px`; + } else { + this.detailElem.style.left = `16px`; + } + clearInterval(this.showDetailsTimeout); // eslint-disable-next-line @typescript-eslint/no-misused-promises this.showDetailsTimeout = setTimeout(async () => {