#Confusing logic of arrangement

1 messages · Page 1 of 1 (latest)

oak mason
#

I am trying to understand this weird logic.

#

Why the seemingly forced random order?
You would expect things to be arranged in a 1 2 3 4 5 6 7 8 manner but it is 1 3 5 2 4 6 7 8 9...

viral thicket
#

And it changes as you resize. Masonry tries to fill the empty spaces. That's what it does and the number order shifts

karmic jasper
#

The order looks correct to me - 1 2 3 4 5 6, alphabetical and they should rearrange as you resize the screen

empty owl
#

Masonry Algorithm:

1 - Fills the first column
2 - Because column height is < some fixed number, go below 1
3 - Because column 1 height is > fixed amount, start a new column
4 - Same as 2
5 - Same as 3 - starts a new column
6 - Same as 2
7 - As maximum columns are now filled, append to the shortest column (or leftmost column if tied)
8 - Same as 7
9 - Same as 7

viral thicket