Convert viewer to use the new surround.

This commit is contained in:
Dermot Duffy
2022-03-25 18:05:06 -07:00
parent 079c7c5da0
commit 40ed9ee336
5 changed files with 41 additions and 115 deletions
+4 -4
View File
@@ -124,11 +124,11 @@ export class FrigateCardThumbnailCarousel extends FrigateCardCarousel {
}
super.updated(changedProperties);
if (changedProperties.has('selected')) {
if (changedProperties.has('_selected')) {
this.updateComplete.then(() => {
if (this._carousel) {
if (this.selected !== undefined && this.selected !== null) {
this.carouselScrollTo(this.selected);
if (this._selected !== undefined && this._selected !== null) {
this.carouselScrollTo(this._selected);
}
}
});
@@ -156,7 +156,7 @@ export class FrigateCardThumbnailCarousel extends FrigateCardCarousel {
const classes = {
embla__slide: true,
'slide-selected': this.selected === childIndex,
'slide-selected': this._selected === childIndex,
};
return html` <frigate-card-thumbnail