Skip to content

Commit

Permalink
fix: Do not apply ScrollOffsets if the source element is the scroll port
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinZikmund committed Apr 4, 2022
1 parent 6c0038f commit b115cb4
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/Uno.UI/UI/Xaml/UIElement.cs
Original file line number Diff line number Diff line change
Expand Up @@ -452,12 +452,11 @@ internal static Matrix3x2 GetTransform(UIElement from, UIElement to)
}
}

// TODO: Valid?
//if (elt.IsScrollPort) // Managed SCP or custom scroller
//{
// offsetX -= elt.ScrollOffsets.X;
// offsetY -= elt.ScrollOffsets.Y;
//}
if (elt.IsScrollPort && elt != from) // Managed SCP or custom scroller
{
offsetX -= elt.ScrollOffsets.X;
offsetY -= elt.ScrollOffsets.Y;
}
#endif

logInfoString?.Append($"{elt}: ({offsetX}, {offsetY}), ");
Expand Down

0 comments on commit b115cb4

Please sign in to comment.