Skip to content

Commit

Permalink
address review
Browse files Browse the repository at this point in the history
  • Loading branch information
kosmydel committed Jun 11, 2024
1 parent 03ce696 commit 118c6e8
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,12 @@ void ScrollViewShadowNode::layout(LayoutContext layoutContext) {
}

Point ScrollViewShadowNode::getContentOriginOffset(
bool /* includeTransform */) const {
bool includeTransform) const {
auto stateData = getStateData();
auto contentOffset = stateData.contentOffset;
auto transform = includeTransform ? getTransform() : Transform::Identity();
auto result = transform * Vector{-contentOffset.x, -contentOffset.y, 0, 1};

return {-contentOffset.x, -contentOffset.y + stateData.scrollAwayPaddingTop};
return {result.x, result.y + stateData.scrollAwayPaddingTop};
}
} // namespace facebook::react

0 comments on commit 118c6e8

Please sign in to comment.