mirror of
https://github.com/zoriya/react-native-svg.git
synced 2026-05-23 19:25:54 +00:00
[android] fix rendering of nested svg
This commit is contained in:
@@ -151,12 +151,15 @@ public class SvgViewShadowNode extends LayoutShadowNode {
|
||||
mCanvas = canvas;
|
||||
if (mAlign != null) {
|
||||
RectF vbRect = getViewBox();
|
||||
float width = getLayoutWidth();
|
||||
float height = getLayoutHeight();
|
||||
boolean nested = Float.isNaN(width) || Float.isNaN(height);
|
||||
float width;
|
||||
float height;
|
||||
boolean nested = getNativeParent() instanceof SvgViewShadowNode;
|
||||
if (nested) {
|
||||
width = Float.parseFloat(mbbWidth) * mScale;
|
||||
height = Float.parseFloat(mbbHeight) * mScale;
|
||||
} else {
|
||||
width = getLayoutWidth();
|
||||
height = getLayoutHeight();
|
||||
}
|
||||
RectF eRect = new RectF(0,0, width, height);
|
||||
if (nested) {
|
||||
|
||||
Reference in New Issue
Block a user