Update: movieElem relative at start

horizontal_scroll_2
Juraj Nyíri 3 years ago
parent 427c392d31
commit 2ee83a7f65

@ -21326,7 +21326,7 @@ style.textContent = css `
overflow: hidden;
border-radius: 5px;
transition: 0.5s;
position: absolute;
position: relative;
z-index: 1;
}
.plexMeetsContainer {
@ -22179,6 +22179,7 @@ class PlexMeetsHomeAssistant extends HTMLElement {
this.loadCustomStyles();
};
this.calculatePositions = () => {
// return; // temp
// todo: figure out why interval is needed here and do it properly
const setLeftOffsetsInterval = setInterval(() => {
this.movieElems = this.getElementsByClassName('movieElem');
@ -22193,6 +22194,7 @@ class PlexMeetsHomeAssistant extends HTMLElement {
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);
};

@ -384,7 +384,7 @@ style.textContent = css`
overflow: hidden;
border-radius: 5px;
transition: 0.5s;
position: absolute;
position: relative;
z-index: 1;
}
.plexMeetsContainer {

@ -907,6 +907,7 @@ class PlexMeetsHomeAssistant extends HTMLElement {
};
calculatePositions = (): void => {
// return; // temp
// todo: figure out why interval is needed here and do it properly
const setLeftOffsetsInterval = setInterval(() => {
this.movieElems = this.getElementsByClassName('movieElem');
@ -920,6 +921,7 @@ class PlexMeetsHomeAssistant extends HTMLElement {
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);
};

Loading…
Cancel
Save