better gantt vertical alignment

This commit is contained in:
STEINNI committed 2026-10-07 08:59:22 +00:00
1 parent 731d6cf55b
commit bb1e64218a
2 files changed
+11 -1

No files matched your search

+10
View File
@@ -194,6 +194,16 @@ class BZgantt extends Buildoz {
}
this.style.setProperty('--tasks-width', Math.ceil(maxWidth) + 'px')
const taskLis = [...this.ul.children].slice(1)
const row = parseFloat(getComputedStyle(this).getPropertyValue('--row')) || this.rowHeight || 25
if(taskLis[0] && taskLis[0].offsetHeight){
this.rowHeight = taskLis[1] ? (taskLis[1].offsetTop - taskLis[0].offsetTop) : taskLis[0].offsetHeight
this.style.setProperty('--chart-top', `${taskLis[0].offsetTop}px`)
} else {
this.rowHeight = row
this.style.setProperty('--chart-top', `${row}px`)
}
const [flow, firstDate, endIdx] = this.buildFlow()
let dayDate = new Date(firstDate)