(
elem: DomSpan | Anchor | HtmlDocumentFragment,
)
| 320 | * children. |
| 321 | */ |
| 322 | const sizeElementFromChildren = function( |
| 323 | elem: DomSpan | Anchor | HtmlDocumentFragment, |
| 324 | ) { |
| 325 | let height = 0; |
| 326 | let depth = 0; |
| 327 | let maxFontSize = 0; |
| 328 | |
| 329 | for (let i = 0; i < elem.children.length; i++) { |
| 330 | const child = elem.children[i]; |
| 331 | if (child.height > height) { |
| 332 | height = child.height; |
| 333 | } |
| 334 | if (child.depth > depth) { |
| 335 | depth = child.depth; |
| 336 | } |
| 337 | if (child.maxFontSize > maxFontSize) { |
| 338 | maxFontSize = child.maxFontSize; |
| 339 | } |
| 340 | } |
| 341 | |
| 342 | elem.height = height; |
| 343 | elem.depth = depth; |
| 344 | elem.maxFontSize = maxFontSize; |
| 345 | }; |
| 346 | |
| 347 | /** |
| 348 | * Makes a span with the given list of classes, list of children, and options. |
no outgoing calls
no test coverage detected
searching dependent graphs…