I'm doing a Nativescript-Angular-App and i have a problem.
The user has to click on the right position on a picture.
I don't understand how to get the coordinates of a simple tap.
I can get the coordinate with the touch gesture (TouchGestureEventData) but it provides a stream of informations. I just want one data.
- GestureEventData hasn't GetX() method.
- TouchGestureEventData has GetX() method but I want only the first touch.
I have tried with touch:
public onTouch(args: TouchGestureEventData) {
console.log(args.getActivePointers()[0].getX());
}
But i get too many data (every movement).
Is there a way to get the coordinate just with a simple tap?
Thanks!