Skip to content

Commit

Permalink
Correctly initialize default transformOrigin prop value to "center"
Browse files Browse the repository at this point in the history
Summary:
## Changelog:
[Internal] -

`view.transformOrigin` prop should be initialized to "center", since this is default [per documentaion](https://reactnative.dev/docs/next/transforms#transform-origin), and it should be treated this way even if the prop is not explicitly set from JS.

Differential Revision: D54229772
  • Loading branch information
rshest authored and facebook-github-bot committed Feb 27, 2024
1 parent 489df72 commit c0a86e7
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,12 @@ class BaseViewProps : public YogaStylableProps, public AccessibilityProps {

// Transform
Transform transform{};
TransformOrigin transformOrigin{};
TransformOrigin transformOrigin{{
ValueUnit{50.0f, UnitType::Percent},
ValueUnit{50.0f, UnitType::Percent},
},
0.0f,
};
BackfaceVisibility backfaceVisibility{};
bool shouldRasterize{};
std::optional<int> zIndex{};
Expand Down

0 comments on commit c0a86e7

Please sign in to comment.