Keep timeline window placement on event click.

This commit is contained in:
Dermot Duffy
2023-04-09 20:07:21 -07:00
parent c3ece98669
commit 36ed1aba83
+5 -2
View File
@@ -487,7 +487,7 @@ export class FrigateCardTimelineCore extends LitElement {
}) // Whether or not to set the timeline window. }) // Whether or not to set the timeline window.
.mergeInContext({ .mergeInContext({
...(canSeek && { mediaViewer: { seek: targetTime } }), ...(canSeek && { mediaViewer: { seek: targetTime } }),
...this._getTimelineContext(properties), ...this._getTimelineContext({ start: properties.start, end: properties.end }),
}) })
.dispatchChangeEvent(this); .dispatchChangeEvent(this);
} }
@@ -609,8 +609,11 @@ export class FrigateCardTimelineCore extends LitElement {
} }
if (view?.queryResults?.hasResults()) { if (view?.queryResults?.hasResults()) {
view.mergeInContext({ mediaViewer: { seek: properties.time } }); view.mergeInContext(
{ mediaViewer: { seek: properties.time }
});
} }
view?.mergeInContext(this._getTimelineContext());
if (this.itemClickAction === 'select' && view) { if (this.itemClickAction === 'select' && view) {
drawerAction = 'open'; drawerAction = 'open';