chore: format

This commit is contained in:
Safwan Samsudeen 2024-11-28 14:33:17 +05:30
parent bc791491b1
commit de53f780b7
3 changed files with 15 additions and 10 deletions

View File

@ -504,8 +504,12 @@ export default class Bar {
and then add the days in the month, making sure the number does not exceed 29
so it is within the column */
if (this.gantt.view_is('Month')) {
const diffDaysBasedOn30DayMonths = date_utils.diff(task_start, gantt_start, 'month') * 30;
const dayInMonth = Math.min(29, date_utils.format(task_start, "DD"));
const diffDaysBasedOn30DayMonths =
date_utils.diff(task_start, gantt_start, 'month') * 30;
const dayInMonth = Math.min(
29,
date_utils.format(task_start, 'DD'),
);
const diff = diffDaysBasedOn30DayMonths + dayInMonth;
x = (diff * column_width) / 30;

View File

@ -680,7 +680,7 @@ export default class Gantt {
}
}
return { x }
return { x };
}
make_grid_highlights() {
@ -697,7 +697,8 @@ export default class Gantt {
const { x: left, date } = this.computeGridHighlightDimensions(
this.options.view_mode,
);
if (!date || !this.dates.find((d) => d.getTime() == date.getTime())) return;
if (!date || !this.dates.find((d) => d.getTime() == date.getTime()))
return;
const top = this.options.header_height + this.options.padding / 2;
const height =
(this.options.bar_height + this.options.padding) *
@ -1297,7 +1298,7 @@ export default class Gantt {
trigger_event(event, args) {
if (this.options['on_' + event]) {
this.options['on_' + event].apply(this, args)
this.options['on_' + event].apply(this, args);
}
}