snap group to grid if SHIFT is down or "always snap to grid" is enabled by choey · Pull Request #229 · pythongosssss/ComfyUI-Custom-Scripts · GitHub
Skip to content

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

Open
choey wants to merge 5 commits into
pythongosssss:mainfrom
choey:snap-group-to-grid
Open

choey wants to merge 5 commits into
pythongosssss:mainfrom
choey:snap-group-to-grid

Conversation

@choey

@choey choey commented Apr 8, 2024 •

Copy link
Copy Markdown
Contributor

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

choey commented Apr 8, 2024

Copy link
Copy Markdown
Contributor Author

@pythongosssss

Copy link
Copy Markdown
Owner

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

@Latentnaut

Copy link
Copy Markdown

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?

@andreszs

Copy link
Copy Markdown
Contributor

@andreszs andreszs mentioned this pull request Dec 19, 2024
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.

4 participants