nativescript-angular
nativescript-angular copied to clipboard
How to get coordinates of starting point for pan gesture
Pan gesture exposes the delta X and delta Y, but I need to know the actual coordinates where the user started the pan. How do I do this? Do I need to use a combination of touch gesture and pan? Thanks
Yes - you can use the touch gesture. One other option is to use the native APIs to get the coordinates. Here is how to get the native event-args form the event-args of the pan gesture:
- In IOS - you can get the UIGestureRecognizer from
eventArgs.ios - In Android - you can get the initial MotionEvent trough
eventArgs.android.initial
The touch gesture is working for me. Thanks