mirror of
https://github.com/cyberarm/cyberarm_engine.git
synced 2025-12-15 12:42:34 +00:00
Fixed elements in a Flow container not positioned correctly after the first wrap
This commit is contained in:
@@ -182,7 +182,7 @@ module CyberarmEngine
|
||||
element.y = element.style.margin_top + @current_position.y
|
||||
|
||||
@current_position.x += element.outer_width
|
||||
@current_position.x = @style.margin_left if @current_position.x >= max_width
|
||||
@current_position.x = @style.margin_left + @style.padding_left if @current_position.x >= max_width
|
||||
end
|
||||
|
||||
def tallest_neighbor(querier, _y_position) # Flow
|
||||
@@ -195,14 +195,14 @@ module CyberarmEngine
|
||||
response
|
||||
end
|
||||
|
||||
def position_on_next_line(child) # Flow
|
||||
@current_position.x = @style.margin_left
|
||||
@current_position.y += tallest_neighbor(child, @current_position.y).outer_height
|
||||
def position_on_next_line(element) # Flow
|
||||
@current_position.x = @style.margin_left + @style.padding_left
|
||||
@current_position.y += tallest_neighbor(element, @current_position.y).outer_height
|
||||
|
||||
child.x = child.style.margin_left + @current_position.x
|
||||
child.y = child.style.margin_top + @current_position.y
|
||||
element.x = element.style.margin_left + @current_position.x
|
||||
element.y = element.style.margin_top + @current_position.y
|
||||
|
||||
@current_position.x += child.outer_width
|
||||
@current_position.x += element.outer_width
|
||||
end
|
||||
|
||||
def move_to_next_line(element) # Stack
|
||||
|
||||
Reference in New Issue
Block a user