On today's (2016-02-04) meeting @Starcounter-Jack came with the idea of "line break" feature, that will make sure that the element will be packed in the "new row". The way to achieve that would be to mark entire space before the highest x and y of items packed before, as not available.
Here is a picture that visualize the "line break" set for tile 4
:
![20160204_170803 linebreak in packery](https://cloud.githubusercontent.com/assets/17435/12830635/9bec569c-cb90-11e5-8050-867fcdbb7369.jpg)
I would suggest to rephrase it a little bit:
As the button uses return/line break icon, we will call the property "line break", and attach it the the last element (3
) before marking space as not available.
("line" applies for vertical and horizontal breaking, "new row" could be confusing, as there are grid/table "rows" between 3
and 4
, so someone could think, we went too far; "line break" in other environments is used at the end of a line, not at the beginning).
Then (to adhere to the implementation specifics), after "line break" element we will simply use current \max_{packed} y
(\max_{packed} x
, for column axis), to remove from free slots
set all rectangles that starts at smaller y
(x
).
With such definition, we could apply it to any axis (rows/cols), in any direction (vert./horiz.) and orientation (RTL/..).
Plus, you closes your line, so event without specifying new line, you will be sure that no other new element (with lower priority) could break into 'your' free space.
Naturally, we do not have to expose all directions to the editor/end user.