clipPathId => clipPathRef

This commit is contained in:
Horcrux
2016-07-19 09:38:41 +08:00
parent d610729208
commit a360d4ec65
@@ -48,7 +48,7 @@ public abstract class RNSVGVirtualNode extends LayoutShadowNode {
protected @Nullable Matrix mMatrix = new Matrix(); protected @Nullable Matrix mMatrix = new Matrix();
protected @Nullable Path mClipPath; protected @Nullable Path mClipPath;
protected @Nullable String mClipPathId; protected @Nullable String mClipPathRef;
private static final int PATH_TYPE_ARC = 4; private static final int PATH_TYPE_ARC = 4;
private static final int PATH_TYPE_CLOSE = 1; private static final int PATH_TYPE_CLOSE = 1;
private static final int PATH_TYPE_CURVETO = 3; private static final int PATH_TYPE_CURVETO = 3;
@@ -112,8 +112,8 @@ public abstract class RNSVGVirtualNode extends LayoutShadowNode {
} }
@ReactProp(name = "clipPathRef") @ReactProp(name = "clipPathRef")
public void setClipPathId(String clipPathRef) { public void setClipPathRef(String clipPathRef) {
mClipPathId = clipPathRef; mClipPathRef = clipPathRef;
markUpdated(); markUpdated();
} }
@@ -266,8 +266,8 @@ public abstract class RNSVGVirtualNode extends LayoutShadowNode {
protected void clip(Canvas canvas, Paint paint) { protected void clip(Canvas canvas, Paint paint) {
Path clip = mClipPath; Path clip = mClipPath;
if (clip == null && mClipPathId != null) { if (clip == null && mClipPathRef != null) {
clip = getSvgShadowNode().getDefinedClipPath(mClipPathId); clip = getSvgShadowNode().getDefinedClipPath(mClipPathRef);
} }
if (clip != null) { if (clip != null) {