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 cad54b4 commit 59fe663
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 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;
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 59fe663

Please sign in to comment.