(node: LayoutNode, style: Styles)
| 404 | } |
| 405 | |
| 406 | const applyPositionStyles = (node: LayoutNode, style: Styles): void => { |
| 407 | if ('position' in style) { |
| 408 | node.setPositionType( |
| 409 | style.position === 'absolute' |
| 410 | ? LayoutPositionType.Absolute |
| 411 | : LayoutPositionType.Relative, |
| 412 | ) |
| 413 | } |
| 414 | if ('top' in style) applyPositionEdge(node, 'top', style.top) |
| 415 | if ('bottom' in style) applyPositionEdge(node, 'bottom', style.bottom) |
| 416 | if ('left' in style) applyPositionEdge(node, 'left', style.left) |
| 417 | if ('right' in style) applyPositionEdge(node, 'right', style.right) |
| 418 | } |
| 419 | |
| 420 | function applyPositionEdge( |
| 421 | node: LayoutNode, |
no test coverage detected