Files
self/patches/react-native-svg+15.15.1.patch
Justin Hernandez 7acc9bb2a6 chore: fix failing mobile demo ios e2e tests (#1710)
* fix failing mobile demo ios e2e tests

* temp test

* add patch. update files

* run demo e2e patch

* sort package json

* disable running on dev
2026-02-05 13:15:05 -08:00

25 lines
1.4 KiB
Diff

diff --git a/node_modules/react-native-svg/common/cpp/react/renderer/components/rnsvg/RNSVGLayoutableShadowNode.cpp b/node_modules/react-native-svg/common/cpp/react/renderer/components/rnsvg/RNSVGLayoutableShadowNode.cpp
--- a/node_modules/react-native-svg/common/cpp/react/renderer/components/rnsvg/RNSVGLayoutableShadowNode.cpp
+++ b/node_modules/react-native-svg/common/cpp/react/renderer/components/rnsvg/RNSVGLayoutableShadowNode.cpp
@@ -27,8 +27,18 @@ void RNSVGLayoutableShadowNode::updatePosition() {
auto style = yogaNode_.style();
style.setPositionType(yoga::PositionType::Absolute);
style.setPosition(yoga::Edge::All, yoga::Style::Length::points(0));
- style.setDimension(yoga::Dimension::Width, yoga::StyleSizeLength::percent(100));
- style.setDimension(yoga::Dimension::Height, yoga::StyleSizeLength::percent(100));
+#if REACT_NATIVE_MINOR_VERSION >= 78
+ style.setDimension(
+ yoga::Dimension::Width, yoga::StyleSizeLength::percent(100));
+ style.setDimension(
+ yoga::Dimension::Height, yoga::StyleSizeLength::percent(100));
+#elif REACT_NATIVE_MINOR_VERSION >= 77
+ style.setDimension(yoga::Dimension::Width, yoga::StyleLength::percent(100));
+ style.setDimension(yoga::Dimension::Height, yoga::StyleLength::percent(100));
+#else
+ style.setDimension(yoga::Dimension::Width, yoga::value::percent(100));
+ style.setDimension(yoga::Dimension::Height, yoga::value::percent(100));
+#endif
yogaNode_.setStyle(style);
}