Skip to content

Commit 74b0191

Browse files
author
nour kouider
committed
Implement title wrapping logic for timeline rendering
1 parent 623e8bd commit 74b0191

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/mermaid/src/diagrams/timeline/timelineRenderer.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ export const draw = function (text: string, id: string, version: string, diagObj
201201

202202
if (title) {
203203
const maxAvailableWidth = svg.node().getBBox().width - LEFT_MARGIN; // Available width for the title
204-
const fontSize = 25; // Initial font size
204+
205205
const wrappedTitle = wrapLabel(title, maxAvailableWidth, { fontSize });
206206

207207
const tempTitle = svg

0 commit comments

Comments
 (0)