|
|
@ -1137,28 +1137,21 @@ class PlexMeetsHomeAssistant extends HTMLElement {
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
resizeBackground = (): void => {
|
|
|
|
resizeBackground = (): void => {
|
|
|
|
console.log('resizeBackground');
|
|
|
|
|
|
|
|
if (this.seasonsElem && this.episodesElem && this.card) {
|
|
|
|
if (this.seasonsElem && this.episodesElem && this.card) {
|
|
|
|
const contentbg = this.getElementsByClassName('contentbg')[0] as HTMLElement;
|
|
|
|
const contentbg = this.getElementsByClassName('contentbg')[0] as HTMLElement;
|
|
|
|
this.contentBGHeight = getHeight(contentbg);
|
|
|
|
this.contentBGHeight = getHeight(contentbg);
|
|
|
|
console.log(contentbg);
|
|
|
|
|
|
|
|
console.log(this.contentBGHeight);
|
|
|
|
|
|
|
|
const requiredSeasonBodyHeight =
|
|
|
|
const requiredSeasonBodyHeight =
|
|
|
|
parseInt(this.seasonsElem.style.top.replace('px', ''), 10) + this.seasonsElem.scrollHeight;
|
|
|
|
parseInt(this.seasonsElem.style.top.replace('px', ''), 10) + this.seasonsElem.scrollHeight;
|
|
|
|
const requiredEpisodeBodyHeight =
|
|
|
|
const requiredEpisodeBodyHeight =
|
|
|
|
parseInt(this.episodesElem.style.top.replace('px', ''), 10) + this.episodesElem.scrollHeight;
|
|
|
|
parseInt(this.episodesElem.style.top.replace('px', ''), 10) + this.episodesElem.scrollHeight;
|
|
|
|
|
|
|
|
|
|
|
|
if (requiredSeasonBodyHeight > this.contentBGHeight && !this.seasonsElemHidden) {
|
|
|
|
if (requiredSeasonBodyHeight > this.contentBGHeight && !this.seasonsElemHidden) {
|
|
|
|
console.log('1');
|
|
|
|
|
|
|
|
this.card.style.height = `${requiredSeasonBodyHeight + 16}px`;
|
|
|
|
this.card.style.height = `${requiredSeasonBodyHeight + 16}px`;
|
|
|
|
} else if (requiredEpisodeBodyHeight > this.contentBGHeight && !this.episodesElemHidden) {
|
|
|
|
} else if (requiredEpisodeBodyHeight > this.contentBGHeight && !this.episodesElemHidden) {
|
|
|
|
console.log('2');
|
|
|
|
|
|
|
|
this.card.style.height = `${requiredEpisodeBodyHeight + 16}px`;
|
|
|
|
this.card.style.height = `${requiredEpisodeBodyHeight + 16}px`;
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
console.log('3');
|
|
|
|
|
|
|
|
this.card.style.height = '100%';
|
|
|
|
this.card.style.height = '100%';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
console.log(getHeight(contentbg));
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|