List of usage examples for com.facebook.react.uimanager ReactShadowNode getParent
@Nullable
T getParent();
From source file:com.horcrux.svg.RNSVGVirtualNode.java
License:Open Source License
protected RNSVGSvgViewShadowNode getSvgShadowNode() { if (mSvgShadowNode != null) { return mSvgShadowNode; }//from w w w .j a v a 2 s .co m ReactShadowNode parent = getParent(); while (!(parent instanceof RNSVGSvgViewShadowNode)) { if (parent == null) { return null; } else { parent = parent.getParent(); } } mSvgShadowNode = (RNSVGSvgViewShadowNode) parent; return mSvgShadowNode; }
From source file:com.horcrux.svg.TSpanShadowNode.java
License:Open Source License
private void setupTextPath() { ReactShadowNode parent = getParent(); while (parent != null) { if (parent.getClass() == TextPathShadowNode.class) { TextPathShadowNode textPath = (TextPathShadowNode) parent; mBezierTransformer = textPath.getBezierTransformer(); break; } else if (!(parent instanceof TextShadowNode)) { break; }// ww w . j a va 2 s . c om parent = parent.getParent(); } }