mirror of
https://github.com/Insality/druid
synced 2025-06-27 10:27:48 +02:00
Merge pull request #298 from itmurker/master
Fix Y position calculation for layouts with nodes of different height for 'horizontal_wrap' mode
This commit is contained in:
commit
86fbe83265
@ -289,13 +289,14 @@ function M:refresh_layout()
|
|||||||
|
|
||||||
-- Compare with eps due the float loss and element flickering
|
-- Compare with eps due the float loss and element flickering
|
||||||
if current_x + node_width - new_row_width > 0.0001 then
|
if current_x + node_width - new_row_width > 0.0001 then
|
||||||
|
current_y = current_y - row.height - margin.y
|
||||||
|
|
||||||
if row_index < #rows then
|
if row_index < #rows then
|
||||||
row_index = row_index + 1
|
row_index = row_index + 1
|
||||||
row = rows[row_index]
|
row = rows[row_index]
|
||||||
end
|
end
|
||||||
|
|
||||||
current_x = -row.width * (0.5 + layout_pivot_offset.x)
|
current_x = -row.width * (0.5 + layout_pivot_offset.x)
|
||||||
current_y = current_y - row.height - margin.y
|
|
||||||
if is_justify and row.count > 1 then
|
if is_justify and row.count > 1 then
|
||||||
current_x = -max_width * (0.5 + layout_pivot_offset.x)
|
current_x = -max_width * (0.5 + layout_pivot_offset.x)
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user