mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-30 20:59:36 +02:00
Fix elements not showing up if they were involved in a relation
This commit is contained in:
@@ -188,6 +188,7 @@ const getData = () => {
|
||||
const node = element as unknown as Node;
|
||||
node.shape = 'requirementBox';
|
||||
node.look = config.look;
|
||||
node.id = element.name;
|
||||
|
||||
nodes.push(node);
|
||||
}
|
||||
@@ -197,8 +198,8 @@ const getData = () => {
|
||||
const isContains = relation.type === Relationships.CONTAINS;
|
||||
const edge: Edge = {
|
||||
id: `${relation.src}-${relation.dst}-${counter}`,
|
||||
start: requirements.get(relation.src)?.id,
|
||||
end: requirements.get(relation.dst)?.id,
|
||||
start: requirements.get(relation.src)?.id ?? elements.get(relation.src)?.name,
|
||||
end: requirements.get(relation.dst)?.id ?? elements.get(relation.dst)?.name,
|
||||
label: `<<${relation.type}>>`,
|
||||
classes: 'relationshipLine',
|
||||
style: ['fill:none', isContains ? '' : 'stroke-dasharray: 10,7'],
|
||||
|
Reference in New Issue
Block a user