Fix elements not showing up if they were involved in a relation

This commit is contained in:
yari-dewalt
2025-01-22 08:49:01 -08:00
parent 809f4eb609
commit fe833e6d16

View File

@@ -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'],