Skip to content

Does perfect masonry respect sorting at all? #20

Description

@KATT

Hey!

I would like that a small specifications on how the algorithm operates gets added to the readme.

The main question is: Does perfectMasonry respect sorting?

In the top of the source code there's the following statement:

Does similar things as the Isotopes "masonry" layoutmode, except that this one will actually go back and plug the holes

Is this statement true? I.e. does it not disregard sorting and rather, does a "normal" masonry layout then recursively goes around the layout and tries to fill the holes?

If we have a grid like this generated by normal masonry (numbers symbolises priority by sort, and X empty space):

[1 BRICK] [2 BRICK] [3 BRICK] [ EMPTY ]
[   4 BIG BRICK   ] [5 BRICK] [6 BRICK]
[7 BRICK] [   8 BIG BRICK   ] [9 BRICK]

Would perfectMasonry iterate through this, move [5 BRICK] to [ EMPTY ], then simply push everything else one step and create this? Or would it not care if it was 5/6/7 that was moved?

[1 BRICK] [2 BRICK] [3 BRICK] [5 BRICK]
[   4 BIG BRICK   ] [6 BRICK] [7 BRICK]
[   8 BIG BRICK   ] [9 BRICK] [ EMPTY ]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions