Fix timeline recentering after manual scroll
This commit is contained in:
@@ -91,6 +91,7 @@ export class FrigateCardThumbnail extends LitElement {
|
||||
view: 'timeline',
|
||||
target: this.target,
|
||||
childIndex: this.childIndex,
|
||||
context: {},
|
||||
})
|
||||
.dispatchChangeEvent(this);
|
||||
}}
|
||||
|
||||
@@ -604,11 +604,13 @@ export class FrigateCardTimelineCore extends LitElement {
|
||||
? (this.view.context as TimelineViewContext)
|
||||
: undefined;
|
||||
|
||||
if (context && !isEqual(context.window, timelineWindow)) {
|
||||
if (context?.window) {
|
||||
console.info(
|
||||
`Setting window from context (${context.window.start} -> ${context.window.end}`,
|
||||
);
|
||||
if (!isEqual(context.window, timelineWindow)) {
|
||||
this._timeline.setWindow(context.window.start, context.window.end);
|
||||
}
|
||||
} else if (
|
||||
eventStart < timelineWindow.start ||
|
||||
eventStart > timelineWindow.end ||
|
||||
|
||||
Reference in New Issue
Block a user