Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up ForceLayoutProvider #8339

Merged
merged 4 commits into from
Dec 6, 2024
Merged

Clean up ForceLayoutProvider #8339

merged 4 commits into from
Dec 6, 2024

Conversation

grtlr
Copy link
Contributor

@grtlr grtlr commented Dec 6, 2024

Related

What

This cleans up the layout provider, to prepare for a force blueprints.

@grtlr grtlr added ui concerns graphical user interface exclude from changelog PRs with this won't show up in CHANGELOG.md feat-graph-view Everything related to the graph view labels Dec 6, 2024
@grtlr grtlr requested a review from abey79 December 6, 2024 10:19
Copy link

github-actions bot commented Dec 6, 2024

Web viewer built successfully. If applicable, you should also test it:

  • I have tested the web viewer
Result Commit Link
e9546b3 https://rerun.io/viewer/pr/8339

Note: This comment is updated whenever you push a commit.

let extent = layout.nodes.get_mut(node).expect("node has to be present");
let i = self.node_index[node];
for (node, template) in &graph.nodes {
let i = i.next().expect("can never happen");
Copy link
Member

Choose a reason for hiding this comment

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

is that a fancy i += 1? :)

I wonder if there is a way to rewrite this logic a little bit. Can't you .join() positions with graph.nodes in the for statement directly?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh, I forgot about slices—that's a good idea!

@grtlr grtlr merged commit 7107267 into main Dec 6, 2024
31 checks passed
@grtlr grtlr deleted the grtlr/remove-node-index branch December 6, 2024 17:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
exclude from changelog PRs with this won't show up in CHANGELOG.md feat-graph-view Everything related to the graph view ui concerns graphical user interface
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants