Swipe gesture is blocked by Rich Text Block inside Dynamic Panel

dbarrett shared this question 5 years ago
Answered

Background:


I've set up a dynamic panel to simulate a slide-show as shown in this video: http://www.justinmind.com/prototyper/.... I have 2 panels inside the master dynamic panel. First I used the on_swipe-left gesture with the slide-left transition to go from Panel_1 to Panel_2, then I used the on_swipe-right gesture with the slide-right transition to go from Panel_2 back to Panel_1.


Question:


When I add anything to any panel, such as a shape, or a block of rich text, the swipe gesture is interrupted by the rich text block and therefore the gesture does not fire the transition. The gesture only registers on those areas Is there some way to group the rich text block and Panel_2 for instance so that the gesture will register anywhere in Panel_2 regardless of content, shapes, text, ect.?


Notes:


I've tried to append the same on_swipe-right/slide-right, on_swipe-left/slide-left (gesture/transition) combo to the contents of each Panel. I got mixed results. It solved the problem for the Panel with the shape (meaning- anywhere you swipe on the panel registers as a swipe and triggers the interaction), but it did not solve the problem for the rich text block (in addition, the text is also not scrolling vertically either now)

Comments (6)

photo
1

You can place an image map on top of all the content in each panel and assign the swipe gesture to it.

photo
1

Great! Thanks!

photo
1

Aha, now what if I wanted to add a third panel (ie. Panel_3), or really any number of additional panels -- this would mean any panels that where not at the beginning or the end would require both right and left swipe gestures. Any ideas on how to accomplish this?

photo
1

In the 'web widgets' library you will find an example of a carousel (made with buttons instead of swipe gestures) that you can use to figure out how to do the one you want http://www.justinmind.com/prototyper/...

photo
1

Ok, thank you for your help so far Victor!


I still can't quite understand how to apply two gestures to a panel (ie. swipe-left and swipe-right). Can you offer another few words on how to accomplish this?


I also have a second question:


Is there a way to simulate a carousel (or 'content slider') in which the 'pagination dots' on the bottom stayed static between slide transitions as well as changed state to show which panel you were on? So the dots would not move, but the image/text would slide left or right.

photo
1

You can apply as many events as you want in the same element. Take a look at the final section of this video: http://www.justinmind.com/prototyper/...


As for the pagination dots, what I'd do is to place the slide transitions in one dynamic panel and the dots in a different dynamic panel. Then, for each transition, change both panels.