mirror of
https://github.com/penpot/penpot.git
synced 2025-07-17 09:47:13 +02:00
🐛 Fix some problems with layouts
This commit is contained in:
parent
6cd2c712ab
commit
5d42b9793b
6 changed files with 30 additions and 7 deletions
|
@ -187,7 +187,7 @@ fn initialize_tracks(
|
|||
let mut children = modified_children_ids(shape, structure.get(&shape.id));
|
||||
let mut first = true;
|
||||
|
||||
if !flex_data.is_reverse() {
|
||||
if flex_data.is_reverse() {
|
||||
children.reverse();
|
||||
}
|
||||
|
||||
|
@ -497,6 +497,14 @@ fn next_anchor(
|
|||
prev_anchor: Point,
|
||||
total_shapes_size: f32,
|
||||
) -> Point {
|
||||
if layout_axis.is_auto_main {
|
||||
let delta = child_axis.margin_main_start
|
||||
+ child_axis.margin_main_end
|
||||
+ child_axis.main_size
|
||||
+ layout_axis.gap_main;
|
||||
return prev_anchor + layout_axis.main_v * delta;
|
||||
}
|
||||
|
||||
let delta = child_axis.margin_main_start
|
||||
+ child_axis.margin_main_end
|
||||
+ match layout_data.justify_content {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue