Skip to content

Commit

Permalink
fix: fix today line position in hour view #452
Browse files Browse the repository at this point in the history
  • Loading branch information
walkerkay committed Mar 29, 2024
1 parent f13abea commit a27d78c
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions packages/gantt/src/views/hour.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,16 @@ export class GanttViewHour extends GanttView {
return points;
}

override getTodayXPoint(): number {
const toady = new GanttDate().startOfMinute();
if (toady.value > this.start.value && toady.value < this.end.value) {
const x = this.getXPointByDate(toady);
return x;
} else {
return null;
}
}

override getDateIntervalWidth(start: GanttDate, end: GanttDate) {
let result = 0;
const minutes = differenceInMinutes(end.value, start.value);
Expand Down

0 comments on commit a27d78c

Please sign in to comment.