fix(web): timeline time bucket issue (#20438)

This commit is contained in:
Jason Rasmussen 2025-07-30 12:21:02 -04:00 committed by GitHub
parent 097e132fba
commit d5a01c0310
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 36 additions and 45 deletions

View file

@ -10,8 +10,8 @@ import {
fromTimelinePlainYearMonth,
getTimes,
setDifference,
type TimelinePlainDateTime,
type TimelinePlainYearMonth,
type TimelineDateTime,
type TimelineYearMonth,
} from '$lib/utils/timeline-util';
import { t } from 'svelte-i18n';
@ -47,11 +47,11 @@ export class MonthGroup {
isHeightActual: boolean = $state(false);
readonly monthGroupTitle: string;
readonly yearMonth: TimelinePlainYearMonth;
readonly yearMonth: TimelineYearMonth;
constructor(
store: TimelineManager,
yearMonth: TimelinePlainYearMonth,
yearMonth: TimelineYearMonth,
initialCount: number,
order: AssetOrder = AssetOrder.Desc,
) {
@ -351,7 +351,7 @@ export class MonthGroup {
}
}
findClosest(target: TimelinePlainDateTime) {
findClosest(target: TimelineDateTime) {
const targetDate = fromTimelinePlainDateTime(target);
let closest = undefined;
let smallestDiff = Infinity;