Comfy-Org/ComfyUI_frontend

[Feature Request]: Snap all group borders do grid, when `Fit Group to Nodes` is used

クローズ

#1,185 opened on 2024/10/09

 (8 件のコメント) (1 件のリアクション) (0 人の担当者)TypeScript (610 件のフォーク)github user discovery
enhancementgood first issue

Repository metrics

Stars
 (1,838 個のスター)
PR merge metrics
 (平均マージ 4d 21h) (30d で 881 merged PRs)

説明

Is there an existing issue for this?

  • I have searched the existing issues and checked the recent builds/commits

What would your feature do ?

Since snap to grid is now in the core, I'm opening here a feature request, that I also have in the extension repo:

https://github.com/pythongosssss/ComfyUI-Custom-Scripts/issues/261

It's a small improvement to make snap to grid work better with groups.

This would allow to snap all group borders to the grid, when Fit Group to Nodes is used ( see last image ).

Proposed workflow

Now groups can also snap to the grid, when dragged, which is great !

But this works in a different way than the Fit Group to Nodes option.


When I use Fit Group to Nodes, the group's bottom border it's aligned with the grid ( but not the top one ).

before_m


And after moving the group, it's the top border that's snapped to grid ( not the bottom one ). So, the node vertical position is changed in relation to the group.

The nodes can be displaced a little up or down in the group ( see the next 2 images ).

after

after2


So after moving, I still need to redimension the bottom border manually, to snap it to the grid, like this:

fit

Once the group's top and bottom borders are aligned to the grid, the node's relative positions will always remain the same, after moving the group again.

But every time I use Fit Group to Nodes the group's top border will be misaligned again.

A solution would be to snap all group borders to the grid, when Fit Group to Nodes is used, like on the last image.

Additional information

No response

コントリビューターガイド