Compare commits
3
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c9bce2ff5a | ||
|
|
76a169a809 | ||
|
|
df194dcb65 |
+4
-3
@@ -31,6 +31,7 @@ class BZgantt extends Buildoz {
|
||||
|
||||
this.fireEvent('domConnected', { gantt: this })
|
||||
this.dayWidth = this.getBZAttribute('daywidth') || 20
|
||||
this.dayWidthPadding = 10
|
||||
if(this.getBZAttribute('nodesfile')) this.nodesfile = this.getBZAttribute('nodesfile')
|
||||
else this.initGantt()
|
||||
const dataSrc = this.getBZAttribute('src')
|
||||
@@ -160,7 +161,7 @@ class BZgantt extends Buildoz {
|
||||
"nodeType": "bar",
|
||||
"id": task.id,
|
||||
"coords": {
|
||||
"x": startIdx * this.dayWidth,
|
||||
"x": (startIdx * this.dayWidth) + (startIdx > 0 ? this.dayWidthPadding : 0),
|
||||
"y": curY,
|
||||
},
|
||||
"markup": markup
|
||||
@@ -211,8 +212,8 @@ class BZgantt extends Buildoz {
|
||||
for(let idx=0; idx<=endIdx; idx++){
|
||||
const dayDiv = document.createElement('div')
|
||||
dayDiv.classList.add('day')
|
||||
dayDiv.style.left = `calc(var(--chart-left) + ${idx * this.dayWidth}px)`
|
||||
dayDiv.style.width = this.dayWidth + 'px'
|
||||
dayDiv.style.left = `calc(var(--chart-left) + ${idx * (this.dayWidth + this.dayWidthPadding)}px)`
|
||||
dayDiv.style.width = (this.dayWidth + this.dayWidthPadding) + 'px'
|
||||
dayDiv.innerHTML = ' ' + dayDate.getDate()
|
||||
if(dayDate.toISOString().substring(0,10) == (new Date()).toISOString().substring(0,10)) dayDiv.classList.add('today')
|
||||
dayDiv.setAttribute('title', new Intl.DateTimeFormat('fr-FR', {
|
||||
|
||||
Reference in new issue
Block a user