mirror of
https://github.com/cyberarm/cyberarm_engine.git
synced 2025-12-16 13:12:34 +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
|
end
|
||||||
|
|
||||||
def fits_on_line?(element) # Flow
|
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 <= max_width &&
|
||||||
@current_position.x + element.outer_width <= window.width
|
@current_position.x + element.outer_width <= window.width
|
||||||
end
|
end
|
||||||
@@ -206,7 +205,6 @@ module CyberarmEngine
|
|||||||
element.y = element.style.margin_top + @current_position.y
|
element.y = element.style.margin_top + @current_position.y
|
||||||
|
|
||||||
@current_position.x += element.outer_width
|
@current_position.x += element.outer_width
|
||||||
@current_position.x = @style.margin_left + @style.padding_left if @current_position.x >= max_width
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def tallest_neighbor(querier, _y_position) # Flow
|
def tallest_neighbor(querier, _y_position) # Flow
|
||||||
|
|||||||
Reference in New Issue
Block a user