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