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

Add fit nodes in view func #244

Merged
merged 3 commits into from
May 23, 2024
Merged

Add fit nodes in view func #244

merged 3 commits into from
May 23, 2024

Conversation

ghsteff
Copy link
Contributor

@ghsteff ghsteff commented May 23, 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?

[ ] Bugfix
[x] 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?

Centering the graph also adjusts the zoom

Issue Number: #130

What is the new behavior?

Centering the graph doesn't change the zoom. There's a new function fitNodesInView that replaces that functionality

Does this PR introduce a breaking change?

[x] Yes - sort of
[ ] No

Other information

This takes the fit/zoom functionality out of the centerGraph function and puts it into a separate fitNodesInView function

This lets users have more control over centering behavior

Screen.Recording.2024-05-23.at.10.18.17.AM.mov

This takes the fit/zoom functionality out of the centerGraph function and puts it into a separate fitNodesInView function

This lets users have more control over centering behavior
@ghsteff ghsteff requested a review from amcdnl May 23, 2024 14:20
@ghsteff ghsteff linked an issue May 23, 2024 that may be closed by this pull request
Copy link

netlify bot commented May 23, 2024

Deploy Preview for reagraph ready!

Name Link
🔨 Latest commit 85173b1
🔍 Latest deploy log https://app.netlify.com/sites/reagraph/deploys/664f50bddf74ae0008b2fa16
😎 Deploy Preview https://deploy-preview-244--reagraph.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@ghsteff ghsteff merged commit e90e46d into master May 23, 2024
5 checks passed
@ghsteff ghsteff deleted the Add-fitNodesInView-func branch May 23, 2024 15:32
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.

centerGraph() also seems to adjust zoom
2 participants