Skip to content

Commit c3fb90a

Browse files
committed
refactor: better impl for axis info
1 parent 89a6f85 commit c3fb90a

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

float-pigment-layout/src/algo/flex_box.rs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1302,8 +1302,16 @@ impl<T: LayoutTreeNode> FlexBox<T> for LayoutUnit<T> {
13021302
.or_zero()
13031303
}
13041304
};
1305-
let baseline_diff =
1306-
child.gen_origin(axis_info, *container_size, offset_main, offset_cross);
1305+
let baseline_diff = child.gen_origin(
1306+
AxisInfo {
1307+
main_dir_rev,
1308+
cross_dir_rev,
1309+
dir,
1310+
},
1311+
*container_size,
1312+
offset_main,
1313+
offset_cross,
1314+
);
13071315
if self_first_baseline_ascent.is_none() {
13081316
self_first_baseline_ascent =
13091317
Some(flex_child.first_baseline_ascent + baseline_diff);

0 commit comments

Comments
 (0)