Swipe and nested clicks


I have a dynamic panel consisting of 3 icons. I’ve set up an OnSwipeLeft and OnSwipeRight interaction so when the user swipes, the dynamic panel will move back and forward.

What I’m having trouble with is adding an OnClick interaction to the icons within the dynamic panel. What I want to do is when you click on a specific icon then the dynamic panel will move like the swipe events.

For some reason, when I add the OnClick interaction within the dynamic panel then it won’t work. However if I remove the OnSwipe interactions on the dynamic panel then the OnClick interaction works.

Any thoughts? Have attached a link to the file.


Swipe and Click.rp (61.8 KB)

Your .rp file works for me (Windows, Chrome). The only icon with an OnClick event was the “2 shots” icon, and it only moves the panel if it’s .x = 360 (so in the initial 3rd spot over.) So, if you swipe right and then click ‘2’ it does nothing. But, if you then swipe left, then clicking ‘2’ slides the panel to the left. Removing the OnSwipe code does not affect this.

See Page 1 of this updated file. I added OnClick events for all icons and simplified the logic.
Swipe and Click.rp (87.2 KB)

I have had issues with OnClick events inside a dynamic panel which has OnDrag events. Moving all your OnClick code to OnMouseUp event will solve this.

1 Like

mbc66 thanks for helping out. Seemed it was working. But what I did find is that by using my Wacom tablet it wasn’t registering as a Click event. Using a trackpad or mouse works but not a wacom tablet.

Also working well for iPad which was the intention.