Skip to content

Commit

Permalink
refactor: change where transform is applied
Browse files Browse the repository at this point in the history
  • Loading branch information
kosmydel committed Jun 11, 2024
1 parent 3a55beb commit cad54b4
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,6 @@ Point ScrollViewShadowNode::getContentOriginOffset(

auto stateData = getStateData();
auto contentOffset = stateData.contentOffset;

const auto& props = getConcreteProps();
auto result = props.resolveTransform(layoutMetrics_) * Vector{-contentOffset.x, -contentOffset.y, 0, 1};

return {result.x, result.y + stateData.scrollAwayPaddingTop};
return {-contentOffset.x, -contentOffset.y + stateData.scrollAwayPaddingTop};
}

} // namespace facebook::react
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,6 @@ Transform LayoutableShadowNode::getTransform() const {

Point LayoutableShadowNode::getContentOriginOffset(
bool /*includeTransform*/) const {

return {0, 0};
}

Expand Down

0 comments on commit cad54b4

Please sign in to comment.