Skip to content

Releases: Servoy/svySwipeListener

Nighlty Build master

24 Dec 09:58
Compare
Choose a tag to compare
Nighlty Build master Pre-release
Pre-release

Nightly build. Branch: master Commit: e2875f7 Package Version: 2024.12.1

v2024.12.0

24 Dec 09:22
186a334
Compare
Choose a tag to compare

This is a service where you can add a listener to swipe events through the addSwipeListener function:

Registers the swipe listener on the specified component or on the whole document.

@param callbackKey {string} The key for which the listener will be added.
@param callback {Function} The callback function to be called when a swipe happens.
@param [swipeDirection] {string} Specify which swipe event to listen to. Can be null (any swipe) or 'up', 'down', 'left', 'right'
@param [component] {runtimecomponent} Component on which swipe event will be added. If null , listener will be added on html document.

@example plugins.swipeListener.addSwipeListener('test', onSwipe)

This listener can be removed by the second function removeSwipeListener based on the key (first parameter of the add)

This only works on touchscreen (mobile) devices where swipe events are generated.