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

Align-To-Grid algorithm is too conservative #621

Open
will-moore opened this issue Feb 12, 2025 · 0 comments
Open

Align-To-Grid algorithm is too conservative #621

will-moore opened this issue Feb 12, 2025 · 0 comments

Comments

@will-moore
Copy link
Member

Align to Grid starts at the top-left selected panel and tries to create rows, looking for the next panel to the right to align and if none is found then it moves to the next row, starting below the first panel in the previous Row.

If no panel is found then it stops.

This means that panels before the first column (of the top-left panel) get missed, and so do any that come after a "gap".

E.g. Before "Align To Grid"...

Image

and After...

Image

In general, the existing algorithm (align each panel to it's neighbour in rows, rather than one overall grid) works well for handling panels of different sizes.
We just need to look a bit harder to find the first panel of each row:

  • check the column to the left
  • for each panel of the previous row, check below until we find the first panel of the next row
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

No branches or pull requests

1 participant