Minor codereview fixes.

This commit is contained in:
Dermot Duffy
2022-04-11 21:08:27 -07:00
parent 90f1cc9f0a
commit 1707377b02
2 changed files with 7 additions and 1 deletions
+6
View File
@@ -849,6 +849,12 @@ export class FrigateCardTimelineCore extends LitElement {
} }
} }
/**
* Generate the context for timeline views.
* @param addWindow Whether or not to include the timeline window. If `false`
* the window is preserved if it is already in the context.
* @returns The TimelineViewContext object.
*/
protected _generateViewContext(addWindow: boolean): TimelineViewContext { protected _generateViewContext(addWindow: boolean): TimelineViewContext {
const currentContext = this.view?.context as TimelineViewContext | undefined; const currentContext = this.view?.context as TimelineViewContext | undefined;
const newContext: TimelineViewContext = {}; const newContext: TimelineViewContext = {};
+1 -1
View File
@@ -256,7 +256,7 @@ export class FrigateCardViewerCarousel extends FrigateCardMediaCarousel {
protected _getOptions(): EmblaOptionsType { protected _getOptions(): EmblaOptionsType {
return { return {
// Start the carousel on the selected child number. // Start the carousel on the selected child number.
startIndex: this._getSlideForChild(this.view?.childIndex) ?? undefined, startIndex: this._getSlideForChild(this.view?.childIndex) ?? 0,
draggable: this.viewerConfig?.draggable, draggable: this.viewerConfig?.draggable,
}; };
} }