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.

Reviewed By: christophpurrer

Differential Revision: D54229772

fbshipit-source-id: 5212792c8dc5db6f4c17d1b2980ac2564c986cd8
  • Loading branch information
rshest authored and facebook-github-bot committed Feb 27, 2024
1 parent 2c1bcba commit 3b93f0e
Showing 1 changed file with 8 additions and 1 deletion.
Expand Up @@ -54,7 +54,14 @@ 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 3b93f0e

Please sign in to comment.