Skip to content

Commit

Permalink
graph bug fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
ismailbayram committed Aug 2, 2023
1 parent 045d523 commit b254112
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions .bigpicture.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"port": 44525,
"ignore": [
"web",
"bin",
"internal/browser/pyproject"
],
"validators": [
Expand Down
7 changes: 4 additions & 3 deletions internal/graph/graph.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,10 @@ func (t *Tree) GenerateLinks() {
t.Links = append(t.Links, NewLink(node, t.Nodes[imported], true))
}

for node.Parent != "." && node.Parent != t.Root.Path {
node = t.Nodes[node.Parent]
t.Links = append(t.Links, NewLink(node, t.Nodes[imported], false))
subNode := node
for subNode.Parent != "." && subNode.Parent != t.Root.Path {
subNode = t.Nodes[subNode.Parent]
t.Links = append(t.Links, NewLink(subNode, t.Nodes[imported], false))
}
}
}
Expand Down

0 comments on commit b254112

Please sign in to comment.