[android] hitTest for Use

This commit is contained in:
Maksym Komarychev
2018-04-06 10:54:59 +03:00
parent 374d166372
commit 3440d72277
@@ -73,6 +73,24 @@ class UseShadowNode extends RenderableShadowNode {
}
}
@Override
public int hitTest(float[] src) {
if (!mInvertible) {
return -1;
}
float[] dst = new float[2];
mInvMatrix.mapPoints(dst, src);
VirtualNode template = getSvgShadowNode().getDefinedTemplate(mHref);
int hitChild = template.hitTest(dst);
if (hitChild != -1) {
return (template.isResponsible() || hitChild != template.getReactTag()) ? hitChild : getReactTag();
}
return -1;
}
@Override
protected Path getPath(Canvas canvas, Paint paint) {
// todo: