From 47744e52715950a02454713ac7ef94c564ba94cc Mon Sep 17 00:00:00 2001 From: zhongwuzw Date: Thu, 7 Nov 2024 17:31:03 +0800 Subject: [PATCH] [iOS] Fabric: Fixes transform when there are multiple values that contain a matrix. --- .../react/renderer/components/view/BaseViewProps.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/packages/react-native/ReactCommon/react/renderer/components/view/BaseViewProps.cpp b/packages/react-native/ReactCommon/react/renderer/components/view/BaseViewProps.cpp index 4ecee2a7a71269..6ba17b2952705d 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/view/BaseViewProps.cpp +++ b/packages/react-native/ReactCommon/react/renderer/components/view/BaseViewProps.cpp @@ -567,9 +567,13 @@ Transform BaseViewProps::resolveTransform( transformMatrix = transform; } else { for (const auto& operation : transform.operations) { - transformMatrix = transformMatrix * - Transform::FromTransformOperation( - operation, layoutMetrics.frame.size); + if (operation.type == TransformOperationType::Arbitrary) { + transformMatrix = transformMatrix * transform; + } else { + transformMatrix = transformMatrix * + Transform::FromTransformOperation( + operation, layoutMetrics.frame.size); + } } }