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

Auto arrange and auto centering support #846

Merged
merged 8 commits into from
May 17, 2023
Merged

Auto arrange and auto centering support #846

merged 8 commits into from
May 17, 2023

Conversation

coffeeorgreentea
Copy link
Contributor

@coffeeorgreentea coffeeorgreentea commented May 16, 2023

What Changed:

Auto arrange with support for multiple independent graphs.
Auto center graphs as well.

How to test:

Ctrl + / triggers an auto arrange.
Ctrl + . centers all nodes and comments to the origin.

Additional information:

Looking into supporting comments for at least auto center before pr.
Comments are supported with centering but not with auto arrange. Going to need a deeper dive for that, but don't want to sink too much time into it in anticipation of rete 2.0 changes.
Comments are semi supported with auto arrange but is not pretty.
We can maybe trigger the auto centering before an export so that the user is no longer lost when importing a project/spell that is far away from the origin

@vercel
Copy link

vercel bot commented May 16, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
magick-client ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 16, 2023 4:34pm
magick-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 16, 2023 4:34pm

@fire
Copy link
Contributor

fire commented May 16, 2023

I didn't do the exact implementation but maybe you can learn something from Godot Engine's auto arrange code godotengine/godot-proposals#1253 and https://github.com/theoway/godot/blob/master/scene/gui/graph_edit.cpp#L1961C17-L2112

@coffeeorgreentea
Copy link
Contributor Author

coffeeorgreentea commented May 16, 2023

I didn't do the exact implementation but maybe you can learn something from Godot Engine's auto arrange code godotengine/godot-proposals#1253 and https://github.com/theoway/godot/blob/master/scene/gui/graph_edit.cpp#L1961C17-L2112

cool ill check it out. right now just doing what works with rete fastest
edit: What an amazing write up

@coffeeorgreentea coffeeorgreentea changed the title Auto arrange support Auto arrange and auto centering support May 16, 2023
@coffeeorgreentea coffeeorgreentea requested a review from Knar33 May 16, 2023 06:40
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.

Getting lost in graph on import
3 participants