Method: TerminalLayout::RenderObject#ending_x_for_current_y

Defined in:
lib/terminal_layout.rb

#ending_x_for_current_yObject



51
52
53
54
55
56
57
58
# File 'lib/terminal_layout.rb', line 51

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

    [child.x, width].min
  end.compact.min || self.width || @box.width
end