Skip to content
Cqoicebordel edited this page Dec 24, 2014 · 2 revisions

If responses has >= 1 image, don't display thumbnail
If responses has == 1 image, and no other atomic object, use special result

Create list of atomic objects in responses, and for each, list possible sizes
Create tree of possibility, for each object, each size
If leaf, pack it
Gather packed results.

Find minimal wasted space, and remove results with more wasted space
If more than 1 result, find minimal number of used lines, and remove results with more lines
If more than 1 result, pick a random/pick the first (to choose)

Layout is done

Clone this wiki locally