Merge remote-tracking branch 'max/touches-group-use'

This commit is contained in:
Mikael Sand
2018-06-07 21:20:35 +03:00
4 changed files with 62 additions and 21 deletions
@@ -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: