Picture of Ludovic Bas
add Swipe gesture for Trickle
by Ludovic Bas - Wednesday, 20 December 2017, 9:12 AM
 

I would like to add a swipe gesture for Trickle (without removing the button).

Is there anything in the Adapt API that I can use like swipe events?

How can I add a listener into the block from Trickle?

Picture of Oliver Foster
Re: add Swipe gesture for Trickle
by Oliver Foster - Wednesday, 20 December 2017, 5:04 PM
 

jquery.mobile swipe events are available inside Adapt. jquery.mobile swipe example > https://github.com/cgkineo/adapt-narrative/blob/master/js/view.js#L19-L23
T
he click event handler for trickle lives here > https://github.com/adaptlearning/adapt-contrib-trickle/blob/master/js/handlers/buttonView.js#L274

Picture of Ludovic Bas
Re: add Swipe gesture for Trickle
by Ludovic Bas - Thursday, 21 December 2017, 8:19 AM
 

Thanks! I've got something working now. I have used this jquery plugin for swipe down/up :

https://github.com/loudoweb/jquerymobile-swipeupdown/blob/master/lib/jquerymobile-swipeupdown.js