Ionic-Angular tap with coordinate

Hello everyone !

I need your help.
I want to implement a tap on images… but the tap depends on coordinate.
if left part => display previous image
if right part => display next image…

The issue is that I don’t know how to do…

I have started to implement a new gesture with onStart($event)… but I don’t know how to get the pan coordinate…

Please help me !

Thank you very much

I think i would create two invisible div elements, which covers the complete sides left and right and give them the click handlers.

Think a gesture is a bit over the top here :smiley:

If @EinfachHans’s suggestion doesn’t get you entirely to where you want to be, it might be worth taking a step back and asking yourself if you’re going to end up reinventing the iDangerous Swiper, in which case maybe starting to use it now will save you a bunch of effort in the long run.

1 Like


Thank you for your answers.
I finally put 2 buttons behind the image…