mirror of
https://github.com/go-vikunja/vikunja.git
synced 2026-03-12 01:59:34 -05:00
fix: clamp gantt bar title position when task starts before visible range
Resolves go-vikunja/vikunja#149
This commit is contained in:
@@ -243,7 +243,9 @@ const getBarTextX = computed(() => (bar: GanttBarModel) => {
|
||||
if (bar.meta?.dateType === 'endOnly') {
|
||||
return getBarX.value(bar) + getBarWidth.value(bar) - 8
|
||||
}
|
||||
return getBarX.value(bar) + 8
|
||||
// When the bar starts before the visible range, clamp text to the left edge
|
||||
// so the title remains visible within the visible portion of the bar.
|
||||
return Math.max(getBarX.value(bar) + 8, 8)
|
||||
})
|
||||
|
||||
function isPartialDate(bar: GanttBarModel) {
|
||||
|
||||
Reference in New Issue
Block a user