Skip to content

Commit

Permalink
fix: initial node selection
Browse files Browse the repository at this point in the history
  • Loading branch information
broofa committed Nov 22, 2021
1 parent dd146c2 commit 17939c9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js/Graph.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,8 @@ export default function Graph() {
svg.setAttribute('height', '100%');
break;
}

select('#graph svg .node').node()?.scrollIntoView();
}

// Filter for which modules should be shown / collapsed in the graph
Expand Down Expand Up @@ -585,8 +587,6 @@ export default function Graph() {
}
}

select('#graph svg .node').node()?.scrollIntoView();

setPane(graph?.modules.size ? 'graph' : 'info');

// Signal other hooks that graph DOM has changed
Expand Down

1 comment on commit 17939c9

@vercel
Copy link

@vercel vercel bot commented on 17939c9 Nov 22, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.