(elem)
| 5552 | |
| 5553 | |
| 5554 | const sizeElementFromChildren = function sizeElementFromChildren(elem) { |
| 5555 | let height = 0; |
| 5556 | let depth = 0; |
| 5557 | let maxFontSize = 0; |
| 5558 | |
| 5559 | for (let i = 0; i < elem.children.length; i++) { |
| 5560 | const child = elem.children[i]; |
| 5561 | |
| 5562 | if (child.height > height) { |
| 5563 | height = child.height; |
| 5564 | } |
| 5565 | |
| 5566 | if (child.depth > depth) { |
| 5567 | depth = child.depth; |
| 5568 | } |
| 5569 | |
| 5570 | if (child.maxFontSize > maxFontSize) { |
| 5571 | maxFontSize = child.maxFontSize; |
| 5572 | } |
| 5573 | } |
| 5574 | |
| 5575 | elem.height = height; |
| 5576 | elem.depth = depth; |
| 5577 | elem.maxFontSize = maxFontSize; |
| 5578 | }; |
| 5579 | /** |
| 5580 | * Makes a span with the given list of classes, list of children, and options. |
| 5581 | * |
no outgoing calls
no test coverage detected