(layout: Layout)
| 385 | * @return {Array} Layout, sorted static items first. |
| 386 | */ |
| 387 | export function sortLayoutItemsByRowCol(layout: Layout): Layout { |
| 388 | return [].concat(layout).sort(function(a, b) { |
| 389 | if (a.y === b.y && a.x === b.x) { |
| 390 | return 0; |
| 391 | } |
| 392 | |
| 393 | if (a.y > b.y || (a.y === b.y && a.x > b.x)) { |
| 394 | return 1; |
| 395 | } |
| 396 | |
| 397 | return -1; |
| 398 | }); |
| 399 | } |
| 400 | |
| 401 | /** |
| 402 | * Generate a layout using the initialLayout and children as a template. |
no outgoing calls
no test coverage detected
searching dependent graphs…