Update: Opening and closing now works in horizontal

horizontal_scroll
Juraj Nyíri 3 years ago
parent 5e6c7be25a
commit 6ef18a5f09

@ -22295,11 +22295,19 @@ class PlexMeetsHomeAssistant extends HTMLElement {
this.movieElems[i].style.width = `${CSS_STYLE.width}px`; this.movieElems[i].style.width = `${CSS_STYLE.width}px`;
this.movieElems[i].style.height = `${CSS_STYLE.height}px`; this.movieElems[i].style.height = `${CSS_STYLE.height}px`;
} }
this.movieElems[i].style.left = `${this.movieElems[i].dataset.left}px`;
this.movieElems[i].style.top = `${this.movieElems[i].dataset.top}px`;
setTimeout(() => {
this.movieElems[i].style.transition = '0s';
this.movieElems[i].style['z-index'] = 1; this.movieElems[i].style['z-index'] = 1;
this.movieElems[i].style.position = 'relative'; this.movieElems[i].style.position = 'relative';
this.movieElems[i].style.left = `0px`; this.movieElems[i].style.left = `0px`;
this.movieElems[i].style.top = `0px`; this.movieElems[i].style.top = `0px`;
this.movieElems[i].dataset.clicked = false; this.movieElems[i].dataset.clicked = false;
setTimeout(() => {
this.movieElems[i].style.transition = '0.5s';
}, 10);
}, 510);
} }
} }
this.hideSeasons(); this.hideSeasons();
@ -22906,11 +22914,11 @@ class PlexMeetsHomeAssistant extends HTMLElement {
this.minimizeAll(); this.minimizeAll();
this.activeMovieElem = undefined; this.activeMovieElem = undefined;
this.hideDetails(); this.hideDetails();
if (lodash.isEqual(movieElem.style.width, movieElem.style.height)) { /*
if (_.isEqual(movieElem.style.width, movieElem.style.height)) {
movieElemLocal.style.width = `${CSS_STYLE.width}px`; movieElemLocal.style.width = `${CSS_STYLE.width}px`;
movieElemLocal.style.height = `${CSS_STYLE.width}px`; movieElemLocal.style.height = `${CSS_STYLE.width}px`;
} } else {
else {
movieElemLocal.style.width = `${CSS_STYLE.width}px`; movieElemLocal.style.width = `${CSS_STYLE.width}px`;
movieElemLocal.style.height = `${CSS_STYLE.height}px`; movieElemLocal.style.height = `${CSS_STYLE.height}px`;
} }
@ -22918,6 +22926,7 @@ class PlexMeetsHomeAssistant extends HTMLElement {
movieElemLocal.style.position = 'relative'; movieElemLocal.style.position = 'relative';
movieElemLocal.style.top = `0px`; movieElemLocal.style.top = `0px`;
movieElemLocal.style.left = `0px`; movieElemLocal.style.left = `0px`;
*/
setTimeout(() => { setTimeout(() => {
movieElemLocal.dataset.clicked = 'false'; movieElemLocal.dataset.clicked = 'false';
}, 500); }, 500);
@ -22929,6 +22938,8 @@ class PlexMeetsHomeAssistant extends HTMLElement {
movieElemLocal.style.left = `${movieElemLocal.offsetLeft - this.content.scrollLeft}px`; movieElemLocal.style.left = `${movieElemLocal.offsetLeft - this.content.scrollLeft}px`;
movieElemLocal.style.top = `${movieElemLocal.offsetTop}px`; movieElemLocal.style.top = `${movieElemLocal.offsetTop}px`;
movieElemLocal.style.position = 'absolute'; movieElemLocal.style.position = 'absolute';
movieElemLocal.dataset.left = `${movieElemLocal.offsetLeft}`;
movieElemLocal.dataset.top = `${movieElemLocal.offsetTop}`;
movieElemLocal.style.zIndex = '3'; movieElemLocal.style.zIndex = '3';
setTimeout(() => { setTimeout(() => {
movieElemLocal.style.transition = '0.5s'; movieElemLocal.style.transition = '0.5s';

@ -1027,12 +1027,20 @@ class PlexMeetsHomeAssistant extends HTMLElement {
this.movieElems[i].style.width = `${CSS_STYLE.width}px`; this.movieElems[i].style.width = `${CSS_STYLE.width}px`;
this.movieElems[i].style.height = `${CSS_STYLE.height}px`; this.movieElems[i].style.height = `${CSS_STYLE.height}px`;
} }
this.movieElems[i].style.left = `${this.movieElems[i].dataset.left}px`;
this.movieElems[i].style.top = `${this.movieElems[i].dataset.top}px`;
setTimeout(() => {
this.movieElems[i].style.transition = '0s';
this.movieElems[i].style['z-index'] = 1; this.movieElems[i].style['z-index'] = 1;
this.movieElems[i].style.position = 'relative'; this.movieElems[i].style.position = 'relative';
this.movieElems[i].style.left = `0px`; this.movieElems[i].style.left = `0px`;
this.movieElems[i].style.top = `0px`; this.movieElems[i].style.top = `0px`;
this.movieElems[i].dataset.clicked = false; this.movieElems[i].dataset.clicked = false;
setTimeout(() => {
this.movieElems[i].style.transition = '0.5s';
}, 10);
}, 510);
} }
} }
this.hideSeasons(); this.hideSeasons();
@ -1704,6 +1712,7 @@ class PlexMeetsHomeAssistant extends HTMLElement {
this.minimizeAll(); this.minimizeAll();
this.activeMovieElem = undefined; this.activeMovieElem = undefined;
this.hideDetails(); this.hideDetails();
/*
if (_.isEqual(movieElem.style.width, movieElem.style.height)) { if (_.isEqual(movieElem.style.width, movieElem.style.height)) {
movieElemLocal.style.width = `${CSS_STYLE.width}px`; movieElemLocal.style.width = `${CSS_STYLE.width}px`;
movieElemLocal.style.height = `${CSS_STYLE.width}px`; movieElemLocal.style.height = `${CSS_STYLE.width}px`;
@ -1715,6 +1724,7 @@ class PlexMeetsHomeAssistant extends HTMLElement {
movieElemLocal.style.position = 'relative'; movieElemLocal.style.position = 'relative';
movieElemLocal.style.top = `0px`; movieElemLocal.style.top = `0px`;
movieElemLocal.style.left = `0px`; movieElemLocal.style.left = `0px`;
*/
setTimeout(() => { setTimeout(() => {
movieElemLocal.dataset.clicked = 'false'; movieElemLocal.dataset.clicked = 'false';
@ -1728,6 +1738,8 @@ class PlexMeetsHomeAssistant extends HTMLElement {
movieElemLocal.style.left = `${movieElemLocal.offsetLeft - this.content.scrollLeft}px`; movieElemLocal.style.left = `${movieElemLocal.offsetLeft - this.content.scrollLeft}px`;
movieElemLocal.style.top = `${movieElemLocal.offsetTop}px`; movieElemLocal.style.top = `${movieElemLocal.offsetTop}px`;
movieElemLocal.style.position = 'absolute'; movieElemLocal.style.position = 'absolute';
movieElemLocal.dataset.left = `${movieElemLocal.offsetLeft}`;
movieElemLocal.dataset.top = `${movieElemLocal.offsetTop}`;
movieElemLocal.style.zIndex = '3'; movieElemLocal.style.zIndex = '3';
setTimeout(() => { setTimeout(() => {
movieElemLocal.style.transition = '0.5s'; movieElemLocal.style.transition = '0.5s';

Loading…
Cancel
Save