mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-18 06:49:47 +02:00
#2732 rendering the title and descr fields for the gitGraph
This commit is contained in:
@@ -9,7 +9,7 @@
|
|||||||
<style>
|
<style>
|
||||||
body {
|
body {
|
||||||
/* background: rgb(221, 208, 208); */
|
/* background: rgb(221, 208, 208); */
|
||||||
background:#111;
|
/* background:#111; */
|
||||||
/* background:#333; */
|
/* background:#333; */
|
||||||
font-family: 'Arial';
|
font-family: 'Arial';
|
||||||
}
|
}
|
||||||
@@ -34,6 +34,11 @@
|
|||||||
"git0": "#550055"
|
"git0": "#550055"
|
||||||
} } }%%
|
} } }%%
|
||||||
gitGraph
|
gitGraph
|
||||||
|
accTitle: "Git Graph"
|
||||||
|
accDescr {
|
||||||
|
Git Graph description.
|
||||||
|
Multiline description
|
||||||
|
}
|
||||||
commit
|
commit
|
||||||
branch develop
|
branch develop
|
||||||
commit tag:"v1.0.0"
|
commit tag:"v1.0.0"
|
||||||
|
@@ -4,6 +4,8 @@ import db from './gitGraphAst';
|
|||||||
import gitGraphParser from './parser/gitGraph';
|
import gitGraphParser from './parser/gitGraph';
|
||||||
import { log } from '../../logger';
|
import { log } from '../../logger';
|
||||||
import { getConfig } from '../../config';
|
import { getConfig } from '../../config';
|
||||||
|
import addSVGAccessibilityFields from '../../accessibility';
|
||||||
|
|
||||||
let allCommitsDict = {};
|
let allCommitsDict = {};
|
||||||
let branchNum;
|
let branchNum;
|
||||||
|
|
||||||
@@ -480,6 +482,9 @@ export const draw = function (txt, id, ver) {
|
|||||||
|
|
||||||
const diagram = select(`[id="${id}"]`);
|
const diagram = select(`[id="${id}"]`);
|
||||||
|
|
||||||
|
// Adds title and description to the flow chart
|
||||||
|
addSVGAccessibilityFields(parser.yy, diagram, id);
|
||||||
|
|
||||||
drawCommits(diagram, allCommitsDict, false);
|
drawCommits(diagram, allCommitsDict, false);
|
||||||
if (gitGraphConfig.showBranches) {
|
if (gitGraphConfig.showBranches) {
|
||||||
drawBranches(diagram, branches);
|
drawBranches(diagram, branches);
|
||||||
|
Reference in New Issue
Block a user