Skip to content

Commit

Permalink
Fix error with auto node size using wrong parent layout type
Browse files Browse the repository at this point in the history
  • Loading branch information
geom3trik committed Oct 20, 2023
1 parent af7cb4f commit 752b4a2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/layout.rs
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ where

// Determine cross-size of auto node from children.
if num_parent_directed_children != 0
&& (node.cross(store, parent_layout_type).is_auto() || node.min_cross(store, parent_layout_type).is_auto())
&& (node.cross(store, layout_type).is_auto() || node.min_cross(store, layout_type).is_auto())
{
min_cross = cross_max + border_cross_before + border_cross_after
}
Expand Down Expand Up @@ -486,7 +486,7 @@ where

// Determine main-size of auto node from children.
if num_parent_directed_children != 0
&& (node.main(store, parent_layout_type).is_auto() || node.min_main(store, parent_layout_type).is_auto())
&& (node.main(store, layout_type).is_auto() || node.min_main(store, layout_type).is_auto())
{
min_main = parent_main.max(main_sum) + border_main_before + border_main_after
}
Expand Down

0 comments on commit 752b4a2

Please sign in to comment.