mirror of
https://github.com/zoriya/react-native-svg.git
synced 2026-06-03 15:14:18 +00:00
Add RenderableView, fix names. Allow percentages in nested SVG (iOS).
This commit is contained in:
@@ -52,7 +52,9 @@
|
||||
}
|
||||
} else if ([node isKindOfClass:[RNSVGSvgView class]]) {
|
||||
RNSVGSvgView* svgView = (RNSVGSvgView*)node;
|
||||
CGRect rect = CGRectMake(0, 0, [svgView.bbWidth floatValue], [svgView.bbHeight floatValue]);
|
||||
CGFloat width = [self relativeOnWidth:svgView.bbWidth];
|
||||
CGFloat height = [self relativeOnHeight:svgView.bbHeight];
|
||||
CGRect rect = CGRectMake(0, 0, width, height);
|
||||
CGContextClipToRect(context, rect);
|
||||
[svgView drawToContext:context withRect:(CGRect)rect];
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user