Skip to content

Align-To-Grid algorithm is too conservative #621

@will-moore

Description

@will-moore

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions