fix: Timeline-Linie auf Fortsetzungsseite bei Seitenüberlauf zeichnen

Wenn ein Projekteintrag auf eine neue Seite überläuft (Tasks zu lang),
wird jetzt trotzdem eine pendingLine vom Seitenanfang der neuen Seite
bis zum Gap vor dem nächsten Eintrag vorgemerkt. Dadurch entsteht eine
durchgehende Timeline-Linie auf der Fortsetzungsseite, die den
überlaufenden Inhalt visuell mit dem nächsten Eintrag verbindet.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Thomas Reitz 2026-03-14 20:16:42 +01:00
parent a7cf59ae20
commit c987ce87c0

View file

@ -517,7 +517,7 @@ export class ProfileExportService {
// sind Quell-Dot und Ziel-Dot auf derselben Seite → Linie korrekt.
if (pendingLineStartY !== null && pendingLineEndY !== null) {
if (yRight + headerH <= pageBottom) {
doc.moveTo(timelineX, pendingLineStartY + 8)
doc.moveTo(timelineX, pendingLineStartY)
.lineTo(timelineX, pendingLineEndY)
.strokeColor(accentColor).lineWidth(1).stroke();
}
@ -533,6 +533,7 @@ export class ProfileExportService {
}
let pageBreakOccurred = false;
let overflowResumeY: number | undefined;
const entryStartY = yRight;
// Timeline-Punkt
@ -562,6 +563,9 @@ export class ProfileExportService {
if (yRight > pageBottom) {
doc.addPage();
yRight = 40;
if (!pageBreakOccurred) {
overflowResumeY = yRight;
}
pageBreakOccurred = true;
}
const raw = task.trim();
@ -585,9 +589,15 @@ export class ProfileExportService {
yRight += 12;
// Linie für nächste Iteration vormerken — nur wenn kein Seitenumbruch innerhalb des Eintrags
// Linie für nächste Iteration vormerken
if (!pageBreakOccurred) {
pendingLineStartY = entryStartY;
// Normaler Fall: Linie von unterhalb des Dots bis zum Gap
pendingLineStartY = entryStartY + 8;
pendingLineEndY = yRight - 4;
} else if (overflowResumeY !== undefined) {
// Überlauf-Fall: Inhalt geht auf neuer Seite weiter.
// Timeline-Linie auf der neuen Seite vormerken (vom Seitenanfang bis zum Gap)
pendingLineStartY = overflowResumeY;
pendingLineEndY = yRight - 4;
}
}