From 9ae2b8c612b27868fde428c5b412239b90f6a427 Mon Sep 17 00:00:00 2001 From: Jakub Grzywacz Date: Wed, 21 Aug 2024 15:13:50 +0200 Subject: [PATCH] fix: transforms on macOS old arch (#2420) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # Summary Since `RNSVGPlatformView` on macOS old arch is just `RCTUIView`, we need to add `updateReactTransformInternal` to `RNSVGSvgView`. ## Compatibility | OS | Implemented | | ------- | :---------: | | MacOS | ✅ | --- apple/Elements/RNSVGSvgView.mm | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/apple/Elements/RNSVGSvgView.mm b/apple/Elements/RNSVGSvgView.mm index 54a951ac..3e4bc1a3 100644 --- a/apple/Elements/RNSVGSvgView.mm +++ b/apple/Elements/RNSVGSvgView.mm @@ -471,6 +471,13 @@ using namespace facebook::react; return _viewBoxTransform; } +#if !RCT_NEW_ARCH_ENABLED && TARGET_OS_OSX // [macOS +- (void)updateReactTransformInternal:(CATransform3D)transform +{ + [self setTransform:CATransform3DGetAffineTransform(transform)]; +} +#endif // macOS] + @end #ifdef RCT_NEW_ARCH_ENABLED