Merge pull request #2038 from mermaid-js/2017_std_req_diagrams

2017 std req diagrams
This commit is contained in:
Ashish Jain
2021-05-07 02:49:32 +02:00
committed by GitHub
2 changed files with 8 additions and 3 deletions

View File

@@ -271,7 +271,7 @@ export const drawElements = (els, graph, svgNode) => {
let bodyNode = newBodyNode(
groupNode,
textId + '_body',
[`Type: ${el.type || 'Not Specified'}`, `Doc Ref: ${el.docref || 'None'}`],
[`Type: ${el.type || 'Not Specified'}`, `Doc Ref: ${el.docRef || 'None'}`],
titleNodeInfo.y
);
@@ -323,6 +323,7 @@ const elementString = str => {
export const draw = (text, id) => {
parser.yy = requirementDb;
parser.yy.clear();
parser.parse(text);
const svg = select(`[id='${id}']`);

View File

@@ -18,7 +18,11 @@ const getStyles = options => `
fill: ${options.requirementBackground};
fill-opacity: 100%;
stroke: ${options.requirementBorderColor};
stroke-size: ${options.requirementBorderSize};
stroke-width: ${options.requirementBorderSize};
}
.reqTitle, .reqLabel{
fill: ${options.requirementTextColor};
}
.reqLabelBox {
fill: ${options.relationLabelBackground};
@@ -27,7 +31,7 @@ const getStyles = options => `
.req-title-line {
stroke: ${options.requirementBorderColor};
stroke-width: 1;
stroke-width: ${options.requirementBorderSize};
}
.relationshipLine {
stroke: ${options.relationColor};