diff --git a/dist/plex-meets-homeassistant.js b/dist/plex-meets-homeassistant.js index cfa5507..a6b7e0f 100644 --- a/dist/plex-meets-homeassistant.js +++ b/dist/plex-meets-homeassistant.js @@ -21978,6 +21978,7 @@ class PlexMeetsHomeAssistant extends HTMLElement { this.contentBGHeight = 0; this.initialDataLoaded = false; this.renderNewElementsIfNeeded = () => { + console.log('renderNewElementsIfNeeded'); const loadAdditionalRowsCount = 2; // todo: make this configurable const height = getHeight(this.content); if (!this.detailsShown && @@ -22497,6 +22498,7 @@ class PlexMeetsHomeAssistant extends HTMLElement { } } this.renderedItems = 0; + this.renderedRows = 0; // this.columnsCount = 0; const spinner = document.createElement('div'); spinner.style.display = 'flex'; @@ -22746,7 +22748,6 @@ class PlexMeetsHomeAssistant extends HTMLElement { break; } else { - this.resizeHandler(); clearInterval(setLeftOffsetsInterval); } } diff --git a/src/plex-meets-homeassistant.ts b/src/plex-meets-homeassistant.ts index 30e8dff..86b92b4 100644 --- a/src/plex-meets-homeassistant.ts +++ b/src/plex-meets-homeassistant.ts @@ -184,6 +184,7 @@ class PlexMeetsHomeAssistant extends HTMLElement { } renderNewElementsIfNeeded = (): void => { + console.log('renderNewElementsIfNeeded'); const loadAdditionalRowsCount = 2; // todo: make this configurable const height = getHeight(this.content); if ( @@ -273,7 +274,6 @@ class PlexMeetsHomeAssistant extends HTMLElement { } } } - this.renderNewElementsIfNeeded(); }); window.addEventListener('resize', () => { @@ -735,6 +735,7 @@ class PlexMeetsHomeAssistant extends HTMLElement { } this.renderedItems = 0; + this.renderedRows = 0; // this.columnsCount = 0; const spinner = document.createElement('div'); @@ -1009,11 +1010,11 @@ class PlexMeetsHomeAssistant extends HTMLElement { // todo: figure out why interval is needed here and do it properly const setLeftOffsetsInterval = setInterval(() => { this.movieElems = this.getElementsByClassName('movieElem'); + for (let i = 0; i < this.movieElems.length; i += 1) { if (this.movieElems[i].offsetLeft === 0) { break; } else { - this.resizeHandler(); clearInterval(setLeftOffsetsInterval); } }