mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-26 10:49:38 +02:00
Merge pull request #2038 from mermaid-js/2017_std_req_diagrams
2017 std req diagrams
This commit is contained in:
@@ -271,7 +271,7 @@ export const drawElements = (els, graph, svgNode) => {
|
|||||||
let bodyNode = newBodyNode(
|
let bodyNode = newBodyNode(
|
||||||
groupNode,
|
groupNode,
|
||||||
textId + '_body',
|
textId + '_body',
|
||||||
[`Type: ${el.type || 'Not Specified'}`, `Doc Ref: ${el.docref || 'None'}`],
|
[`Type: ${el.type || 'Not Specified'}`, `Doc Ref: ${el.docRef || 'None'}`],
|
||||||
titleNodeInfo.y
|
titleNodeInfo.y
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -323,6 +323,7 @@ const elementString = str => {
|
|||||||
|
|
||||||
export const draw = (text, id) => {
|
export const draw = (text, id) => {
|
||||||
parser.yy = requirementDb;
|
parser.yy = requirementDb;
|
||||||
|
parser.yy.clear();
|
||||||
parser.parse(text);
|
parser.parse(text);
|
||||||
|
|
||||||
const svg = select(`[id='${id}']`);
|
const svg = select(`[id='${id}']`);
|
||||||
|
@@ -18,7 +18,11 @@ const getStyles = options => `
|
|||||||
fill: ${options.requirementBackground};
|
fill: ${options.requirementBackground};
|
||||||
fill-opacity: 100%;
|
fill-opacity: 100%;
|
||||||
stroke: ${options.requirementBorderColor};
|
stroke: ${options.requirementBorderColor};
|
||||||
stroke-size: ${options.requirementBorderSize};
|
stroke-width: ${options.requirementBorderSize};
|
||||||
|
}
|
||||||
|
|
||||||
|
.reqTitle, .reqLabel{
|
||||||
|
fill: ${options.requirementTextColor};
|
||||||
}
|
}
|
||||||
.reqLabelBox {
|
.reqLabelBox {
|
||||||
fill: ${options.relationLabelBackground};
|
fill: ${options.relationLabelBackground};
|
||||||
@@ -27,7 +31,7 @@ const getStyles = options => `
|
|||||||
|
|
||||||
.req-title-line {
|
.req-title-line {
|
||||||
stroke: ${options.requirementBorderColor};
|
stroke: ${options.requirementBorderColor};
|
||||||
stroke-width: 1;
|
stroke-width: ${options.requirementBorderSize};
|
||||||
}
|
}
|
||||||
.relationshipLine {
|
.relationshipLine {
|
||||||
stroke: ${options.relationColor};
|
stroke: ${options.relationColor};
|
||||||
|
Reference in New Issue
Block a user