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

snap group to grid if SHIFT is down or "always snap to grid" is enabled #229

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

choey
Copy link
Contributor

@choey choey commented Apr 8, 2024

This PR addresses #198.

Problem

Groups do not snap like nodes do, which makes maintaining neatly aligned nodes extremely difficult/cumbersome.

Solution

Make groups behave like nodes, by snapping their position and size to the grid:

demo.mp4

When "always snap to grid" is off, holding SHIFT enables snapping for groups, as is the behavior for nodes.
Snapping also works when pressing CTRL while dragging a group to release the "tether" from the group to its nodes.

@choey
Copy link
Contributor Author

choey commented Apr 8, 2024

Groups would benefit from some sort of guide lines (like in #228), but that could be a future iteration. Some options to consider:

  1. show guide lines orthogonal to the group (i.e., 2 horizontal and 2 vertical lines like it's done for nodes in show guide lines/boxes for nodes #228)
  2. show guide lines for all nodes within the group

Maybe both?

@pythongosssss
Copy link
Owner

Hey, I apologise for the slowness, I think this functionality has since been added to core ComfyUI

@Latentnaut
Copy link

As far I remember, before the new interface, snap to grid ON behaviour was always snap, no need of press Shift.

That was super easy to aligh and tidy up nodes. With this Shift change, I always select two or three nodes accidentaly and it's tedious.

Any chance to come back to the original snapping behaviour?

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.

3 participants