mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-08-15 06:19:24 +02:00
Merge pull request #6715 from Syn3ugar/feature/timelineRenderer-conf
fix: update leftMargin value
This commit is contained in:
7
.changeset/wild-areas-lick.md
Normal file
7
.changeset/wild-areas-lick.md
Normal 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.
|
@@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user