mirror of
https://github.com/zoriya/react-native-svg.git
synced 2025-12-06 07:06:11 +00:00
feat: use dynamics instead of strings for props that can be either string or number (#2238)
# Summary PR bringing proper support for react-native-reanimated in the library by using dynamics instead of strings for props that can be either string or number.
This commit is contained in:
@@ -70,8 +70,14 @@ using namespace facebook::react;
|
||||
self.minY = newProps.minY;
|
||||
self.vbWidth = newProps.vbWidth;
|
||||
self.vbHeight = newProps.vbHeight;
|
||||
self.bbWidth = [RNSVGLength lengthWithString:RCTNSStringFromString(newProps.bbWidth)];
|
||||
self.bbHeight = [RNSVGLength lengthWithString:RCTNSStringFromString(newProps.bbHeight)];
|
||||
id bbWidth = RNSVGConvertFollyDynamicToId(newProps.bbWidth);
|
||||
if (bbWidth != nil) {
|
||||
self.bbWidth = [RCTConvert RNSVGLength:bbWidth];
|
||||
}
|
||||
id bbHeight = RNSVGConvertFollyDynamicToId(newProps.bbHeight);
|
||||
if (bbHeight != nil) {
|
||||
self.bbHeight = [RCTConvert RNSVGLength:bbHeight];
|
||||
}
|
||||
self.align = RCTNSStringFromStringNilIfEmpty(newProps.align);
|
||||
self.meetOrSlice = intToRNSVGVBMOS(newProps.meetOrSlice);
|
||||
if (RCTUIColorFromSharedColor(newProps.tintColor)) {
|
||||
|
||||
Reference in New Issue
Block a user