|
|
@ -21910,6 +21910,26 @@ class PlexMeetsHomeAssistant extends HTMLElement {
|
|
|
|
this.calculatePositions();
|
|
|
|
this.calculatePositions();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
this.resizeHandler = () => {
|
|
|
|
|
|
|
|
if (this.isVisible) {
|
|
|
|
|
|
|
|
if (!this.detailsShown) {
|
|
|
|
|
|
|
|
const videoPlayer = this.getElementsByClassName('videoPlayer')[0];
|
|
|
|
|
|
|
|
let isFullScreen = false;
|
|
|
|
|
|
|
|
if (videoPlayer.children.length > 0) {
|
|
|
|
|
|
|
|
isFullScreen = isVideoFullScreen(this);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (this.card && this.movieElems.length > 0 && !isFullScreen) {
|
|
|
|
|
|
|
|
if (this.previousPageWidth !== this.card.offsetWidth) {
|
|
|
|
|
|
|
|
this.previousPageWidth = this.card.offsetWidth;
|
|
|
|
|
|
|
|
this.renderPage();
|
|
|
|
|
|
|
|
const contentbg = this.getElementsByClassName('contentbg');
|
|
|
|
|
|
|
|
this.contentBGHeight = getHeight(contentbg[0]);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
this.renderNewElementsIfNeeded();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
};
|
|
|
|
this.loadInitialData = async () => {
|
|
|
|
this.loadInitialData = async () => {
|
|
|
|
this.initialDataLoaded = true;
|
|
|
|
this.initialDataLoaded = true;
|
|
|
|
setInterval(() => {
|
|
|
|
setInterval(() => {
|
|
|
@ -21964,24 +21984,7 @@ class PlexMeetsHomeAssistant extends HTMLElement {
|
|
|
|
this.renderNewElementsIfNeeded();
|
|
|
|
this.renderNewElementsIfNeeded();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
window.addEventListener('resize', () => {
|
|
|
|
window.addEventListener('resize', () => {
|
|
|
|
if (this.isVisible) {
|
|
|
|
this.resizeHandler();
|
|
|
|
if (!this.detailsShown) {
|
|
|
|
|
|
|
|
const videoPlayer = this.getElementsByClassName('videoPlayer')[0];
|
|
|
|
|
|
|
|
let isFullScreen = false;
|
|
|
|
|
|
|
|
if (videoPlayer.children.length > 0) {
|
|
|
|
|
|
|
|
isFullScreen = isVideoFullScreen(this);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (this.card && this.movieElems.length > 0 && !isFullScreen) {
|
|
|
|
|
|
|
|
if (this.previousPageWidth !== this.card.offsetWidth) {
|
|
|
|
|
|
|
|
this.previousPageWidth = this.card.offsetWidth;
|
|
|
|
|
|
|
|
this.renderPage();
|
|
|
|
|
|
|
|
const contentbg = this.getElementsByClassName('contentbg');
|
|
|
|
|
|
|
|
this.contentBGHeight = getHeight(contentbg[0]);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
this.renderNewElementsIfNeeded();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
});
|
|
|
|
if (this.card) {
|
|
|
|
if (this.card) {
|
|
|
|
this.previousPageWidth = this.card.offsetWidth;
|
|
|
|
this.previousPageWidth = this.card.offsetWidth;
|
|
|
@ -22624,15 +22627,9 @@ class PlexMeetsHomeAssistant extends HTMLElement {
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
else {
|
|
|
|
|
|
|
|
this.resizeHandler();
|
|
|
|
clearInterval(setLeftOffsetsInterval);
|
|
|
|
clearInterval(setLeftOffsetsInterval);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/*
|
|
|
|
|
|
|
|
this.movieElems[i].style.left = `${this.movieElems[i].offsetLeft}px`;
|
|
|
|
|
|
|
|
this.movieElems[i].dataset.left = this.movieElems[i].offsetLeft;
|
|
|
|
|
|
|
|
this.movieElems[i].style.top = `${this.movieElems[i].offsetTop}px`;
|
|
|
|
|
|
|
|
this.movieElems[i].dataset.top = this.movieElems[i].offsetTop;
|
|
|
|
|
|
|
|
this.movieElems[i].style.position = 'absolute';
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}, 100);
|
|
|
|
}, 100);
|
|
|
|
};
|
|
|
|
};
|
|
|
|