Merge pull request #6715 from Syn3ugar/feature/timelineRenderer-conf

fix: update leftMargin value
This commit is contained in:
Alois Klink
2025-07-10 10:37:48 +00:00
committed by GitHub
2 changed files with 8 additions and 2 deletions

View File

@@ -0,0 +1,7 @@
---
'mermaid': patch
---
fix(timeline): fix loading `leftMargin` from config
The `timeline.leftMargin` config value should now correctly control the size of the left margin, instead of being ignored.

View File

@@ -28,8 +28,7 @@ interface TimelineTask {
export const draw = function (text: string, id: string, version: string, diagObj: Diagram) {
//1. Fetch the configuration
const conf = getConfig();
// @ts-expect-error - wrong config?
const LEFT_MARGIN = conf.leftMargin ?? 50;
const LEFT_MARGIN = conf.timeline?.leftMargin ?? 50;
log.debug('timeline', diagObj.db);