feat(gantt): right-align text for endOnly partial-date bars

This commit is contained in:
kolaente
2026-02-18 22:25:35 +01:00
parent 2bf99cf2d0
commit 6d6a1deba4

View File

@@ -120,6 +120,7 @@
<text
:x="getBarTextX(bar)"
:y="24"
:text-anchor="bar.meta?.dateType === 'endOnly' ? 'end' : 'start'"
class="gantt-bar-text"
:fill="getBarTextColor(bar)"
:text-decoration="bar.meta?.isDone ? 'line-through' : 'none'"
@@ -239,6 +240,9 @@ const getBarWidth = computed(() => (bar: GanttBarModel) => {
})
const getBarTextX = computed(() => (bar: GanttBarModel) => {
if (bar.meta?.dateType === 'endOnly') {
return getBarX.value(bar) + getBarWidth.value(bar) - 8
}
return getBarX.value(bar) + 8
})