Skip to content

Commit

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

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

return {result.x, result.y + stateData.scrollAwayPaddingTop};
}
} // namespace facebook::react
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ Transform LayoutableShadowNode::getTransform() const {
}

Point LayoutableShadowNode::getContentOriginOffset(
bool /*includeTransform*/) const {
bool includeTransform) const {
return {0, 0};
}

Expand Down

0 comments on commit 0094773

Please sign in to comment.