Merge branch 'main' of https://gitea.internike.com/nike/buildoz
This commit is contained in:
commit
256349d23e
2 files changed
+11
-1
No files matched your search
+1
-1
@@ -397,7 +397,7 @@ bz-gantt ul.tasks li{
|
||||
bz-gantt.gantt bz-graflow{
|
||||
position: absolute;
|
||||
left: var(--chart-left);
|
||||
top: calc(var(--row) + var(--bar-gap)); /* one header row (days grid) + bar centering gap */
|
||||
top: calc(var(--chart-top, var(--row)) + var(--bar-gap)); /* first task row, measured in refresh(), plus bar centering gap */
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
width: auto; /* cancel the global bz-graflow 100vw/100vh defaults, */
|
||||
|
||||
+10
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user