Skip to content

Commit

Permalink
Fix layout drag/drop offset
Browse files Browse the repository at this point in the history
In certain cases, the drop index would be offset by an incorrect value causing the layout to be dropped in the wrong location relative to sibling layouts.

Also added a fix where layouts with percentage inside a layout that's filled weren't respecting the filled size.

Diffs=
56511a285 Fix layout drag/drop offset (#8220)

Co-authored-by: Philip Chung <[email protected]>
  • Loading branch information
philter and philter committed Sep 25, 2024
1 parent 6197796 commit 8b50d16
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .rive_head
Original file line number Diff line number Diff line change
@@ -1 +1 @@
f0c58200a66ca9fc1408cdd7b8ef5ecc6d19f3f0
56511a2858f8e01481eb23d2cca00cbf5c25fd93
2 changes: 2 additions & 0 deletions src/layout_component.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,7 @@ void LayoutComponent::syncStyle()
if (parentIsRow)
{
ygStyle.flexGrow() = YGFloatOptional(1);
ygStyle.flexShrink() = YGFloatOptional(1);
}
else
{
Expand Down Expand Up @@ -400,6 +401,7 @@ void LayoutComponent::syncStyle()
if (!parentIsRow)
{
ygStyle.flexGrow() = YGFloatOptional(1);
ygStyle.flexShrink() = YGFloatOptional(1);
}
else
{
Expand Down

0 comments on commit 8b50d16

Please sign in to comment.