Fix thumbnail fade issue.
This commit is contained in:
@@ -178,6 +178,7 @@ export class FrigateCardSurround extends LitElement {
|
|||||||
.hass=${this.hass}
|
.hass=${this.hass}
|
||||||
.config=${this.thumbnailConfig}
|
.config=${this.thumbnailConfig}
|
||||||
.cameraManager=${this.cameraManager}
|
.cameraManager=${this.cameraManager}
|
||||||
|
.fadeThumbnails=${this.view.isViewerView()}
|
||||||
.view=${this.view}
|
.view=${this.view}
|
||||||
.selected=${this.view.queryResults?.getSelectedIndex() ?? undefined}
|
.selected=${this.view.queryResults?.getSelectedIndex() ?? undefined}
|
||||||
@frigate-card:view:change=${(ev: CustomEvent) => changeDrawer(ev, 'close')}
|
@frigate-card:view:change=${(ev: CustomEvent) => changeDrawer(ev, 'close')}
|
||||||
|
|||||||
@@ -37,6 +37,9 @@ export class FrigateCardThumbnailCarousel extends LitElement {
|
|||||||
@property({ attribute: false })
|
@property({ attribute: false })
|
||||||
public config?: ThumbnailsControlConfig;
|
public config?: ThumbnailsControlConfig;
|
||||||
|
|
||||||
|
@property({ attribute: false })
|
||||||
|
public fadeThumbnails = false;
|
||||||
|
|
||||||
protected _thumbnailSlides: TemplateResult[] = [];
|
protected _thumbnailSlides: TemplateResult[] = [];
|
||||||
|
|
||||||
protected willUpdate(changedProps: PropertyValues): void {
|
protected willUpdate(changedProps: PropertyValues): void {
|
||||||
@@ -65,7 +68,7 @@ export class FrigateCardThumbnailCarousel extends LitElement {
|
|||||||
if (changedProps.has('view')) {
|
if (changedProps.has('view')) {
|
||||||
this.style.setProperty(
|
this.style.setProperty(
|
||||||
'--frigate-card-carousel-thumbnail-opacity',
|
'--frigate-card-carousel-thumbnail-opacity',
|
||||||
this._getSelectedSlide() === null ? '1.0' : '0.4',
|
!this.fadeThumbnails || this._getSelectedSlide() === null ? '1.0' : '0.4',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user