mirror of
https://github.com/zoriya/react-native-svg.git
synced 2026-06-05 16:04:38 +00:00
[android] Fix transform of location in hitTesting.
This commit is contained in:
@@ -197,7 +197,7 @@ class GroupView extends RenderableView {
|
|||||||
|
|
||||||
float[] dst = new float[2];
|
float[] dst = new float[2];
|
||||||
mInvMatrix.mapPoints(dst, src);
|
mInvMatrix.mapPoints(dst, src);
|
||||||
mInvTransform.mapPoints(dst, src);
|
mInvTransform.mapPoints(dst);
|
||||||
|
|
||||||
int x = Math.round(dst[0]);
|
int x = Math.round(dst[0]);
|
||||||
int y = Math.round(dst[1]);
|
int y = Math.round(dst[1]);
|
||||||
|
|||||||
@@ -434,7 +434,7 @@ abstract public class RenderableView extends VirtualView {
|
|||||||
|
|
||||||
float[] dst = new float[2];
|
float[] dst = new float[2];
|
||||||
mInvMatrix.mapPoints(dst, src);
|
mInvMatrix.mapPoints(dst, src);
|
||||||
mInvTransform.mapPoints(dst, src);
|
mInvTransform.mapPoints(dst);
|
||||||
int x = Math.round(dst[0]);
|
int x = Math.round(dst[0]);
|
||||||
int y = Math.round(dst[1]);
|
int y = Math.round(dst[1]);
|
||||||
|
|
||||||
|
|||||||
@@ -977,7 +977,7 @@ class TSpanView extends TextView {
|
|||||||
|
|
||||||
float[] dst = new float[2];
|
float[] dst = new float[2];
|
||||||
mInvMatrix.mapPoints(dst, src);
|
mInvMatrix.mapPoints(dst, src);
|
||||||
mInvTransform.mapPoints(dst, src);
|
mInvTransform.mapPoints(dst);
|
||||||
int x = Math.round(dst[0]);
|
int x = Math.round(dst[0]);
|
||||||
int y = Math.round(dst[1]);
|
int y = Math.round(dst[1]);
|
||||||
|
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ class UseView extends RenderableView {
|
|||||||
|
|
||||||
float[] dst = new float[2];
|
float[] dst = new float[2];
|
||||||
mInvMatrix.mapPoints(dst, src);
|
mInvMatrix.mapPoints(dst, src);
|
||||||
mInvTransform.mapPoints(dst, src);
|
mInvTransform.mapPoints(dst);
|
||||||
|
|
||||||
VirtualView template = getSvgView().getDefinedTemplate(mHref);
|
VirtualView template = getSvgView().getDefinedTemplate(mHref);
|
||||||
int hitChild = template.hitTest(dst);
|
int hitChild = template.hitTest(dst);
|
||||||
|
|||||||
Reference in New Issue
Block a user