(boxes)
| 26 | } |
| 27 | |
| 28 | function wrapBoxes(boxes) { |
| 29 | const layoutBoxes = []; |
| 30 | let i, ilen, box, pos, stack, stackWeight; |
| 31 | |
| 32 | for (i = 0, ilen = (boxes || []).length; i < ilen; ++i) { |
| 33 | box = boxes[i]; |
| 34 | ({position: pos, options: {stack, stackWeight = 1}} = box); |
| 35 | layoutBoxes.push({ |
| 36 | index: i, |
| 37 | box, |
| 38 | pos, |
| 39 | horizontal: box.isHorizontal(), |
| 40 | weight: box.weight, |
| 41 | stack: stack && (pos + stack), |
| 42 | stackWeight |
| 43 | }); |
| 44 | } |
| 45 | return layoutBoxes; |
| 46 | } |
| 47 | |
| 48 | function buildStacks(layouts) { |
| 49 | const stacks = {}; |
no test coverage detected