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

Re-center camera when nodes update #204

Merged
merged 2 commits into from
Mar 18, 2024

Conversation

ghsteff
Copy link
Contributor

@ghsteff ghsteff commented Mar 13, 2024

PR Checklist

Please check if your PR fulfills the following requirements:

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

PR Type

What kind of change does this PR introduce?

[x] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Other... Please describe:

What is the current behavior?

When node positions change (from dragging, layout change, etc.) they can sometimes go outside the camera's view. Then the user has to pan the camera around to look for the graph

What is the new behavior?

The camera re-centers on the graph when node positions change and any are out of view

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

BEFORE

Screen.Recording.2024-03-13.at.12.42.20.PM.mov
Screen.Recording.2024-03-13.at.12.44.04.PM.mov

AFTER

Screen.Recording.2024-03-13.at.12.42.51.PM.mov
Screen.Recording.2024-03-13.at.12.44.22.PM.mov

@ghsteff ghsteff requested a review from amcdnl March 13, 2024 19:46
@amcdnl amcdnl merged commit 5ad4804 into master Mar 18, 2024
1 check passed
@amcdnl amcdnl deleted the fix/re-center-camera-on-nodes-update branch March 18, 2024 09:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants