Method: TerminalLayout::RenderObject#starting_x_for_current_y

Defined in:
lib/terminal_layout.rb

#starting_x_for_current_yObject



42
43
44
45
46
47
48
49
# File 'lib/terminal_layout.rb', line 42

def starting_x_for_current_y
  children.map do |child|
    next unless child.float == :left || child.display == :inline
    next unless child.y && child.y <= @current_y && (child.y + child.height - 1) >= @current_y

    [child.x + child.width, x].max
  end.compact.max || 0
end