Fix thumbnail fade issue.

This commit is contained in:
Dermot Duffy
2023-09-05 20:58:55 -07:00
parent 7173743d0b
commit 88563b59ac
2 changed files with 5 additions and 1 deletions
+4 -1
View File
@@ -37,6 +37,9 @@ export class FrigateCardThumbnailCarousel extends LitElement {
@property({ attribute: false })
public config?: ThumbnailsControlConfig;
@property({ attribute: false })
public fadeThumbnails = false;
protected _thumbnailSlides: TemplateResult[] = [];
protected willUpdate(changedProps: PropertyValues): void {
@@ -65,7 +68,7 @@ export class FrigateCardThumbnailCarousel extends LitElement {
if (changedProps.has('view')) {
this.style.setProperty(
'--frigate-card-carousel-thumbnail-opacity',
this._getSelectedSlide() === null ? '1.0' : '0.4',
!this.fadeThumbnails || this._getSelectedSlide() === null ? '1.0' : '0.4',
);
}
}