Allow the carousel 'slide' animation to be disabled.

This commit is contained in:
Dermot Duffy
2022-02-08 20:36:07 -08:00
parent ec33a2ddf8
commit 724ca4c843
9 changed files with 67 additions and 3 deletions
+9
View File
@@ -22,6 +22,7 @@ import type {
CameraConfig,
ExtendedHomeAssistant,
MediaShowInfo,
TransitionEffect,
ViewerConfig,
} from '../types.js';
import { FrigateCardMediaCarousel, IMG_EMPTY } from './media-carousel.js';
@@ -302,6 +303,14 @@ export class FrigateCardViewerCarousel extends FrigateCardMediaCarousel {
return slideIndex !== undefined ? Number(slideIndex) : undefined;
}
/**
* Get the transition effect to use.
* @returns An TransitionEffect object.
*/
protected _getTransitionEffect(): TransitionEffect | undefined {
return this.viewerConfig?.transition_effect;
}
/**
* Get the Embla options to use.
* @returns An EmblaOptionsType object or undefined for no options.