split_horizontal

Function split_horizontal 

Source
pub fn split_horizontal(
    root: &mut LayoutNode,
    target_id: &str,
    new_node: LayoutNode,
    position: SplitPosition,
) -> Result<(), LayoutError>
Expand description

Horizontal split: insert new_node before/after target_id.

  • If the target’s parent is a Row, splice directly.
  • Otherwise, wrap target + new_node in a fresh Row group.