mirror of
https://github.com/cyberarm/cyberarm_engine.git
synced 2025-12-15 20:52:35 +00:00
Fixed layout bug for Flow when the element x + width is greater than the parent's width it would not correctly wrap
This commit is contained in:
@@ -196,7 +196,6 @@ module CyberarmEngine
|
||||
end
|
||||
|
||||
def fits_on_line?(element) # Flow
|
||||
p [@options[:id], @width] if @options[:id]
|
||||
@current_position.x + element.outer_width <= max_width &&
|
||||
@current_position.x + element.outer_width <= window.width
|
||||
end
|
||||
@@ -206,7 +205,6 @@ module CyberarmEngine
|
||||
element.y = element.style.margin_top + @current_position.y
|
||||
|
||||
@current_position.x += element.outer_width
|
||||
@current_position.x = @style.margin_left + @style.padding_left if @current_position.x >= max_width
|
||||
end
|
||||
|
||||
def tallest_neighbor(querier, _y_position) # Flow
|
||||
|
||||
Reference in New Issue
Block a user