react-native-svg
react-native-svg copied to clipboard
How to get the coordinates with respect to the root Svg for the onPress event?
<Svg
height={mapContainerViewDims.height}
width={mapContainerViewDims.width}
viewBox="0 0 612 792"
preserveAspectRatio="xMinYMin">
<G
onPressIn={({nativeEvent}) => {
console.log(nativeEvent);
setToolTipCord({
x: nativeEvent.pageX ,
y: nativeEvent.pageY,
});
}}>{
//some other svgs
}
</G>
</Svg>
I basically want to show a tooltip kind of component with respect to the location user presses.