aboutsummaryrefslogtreecommitdiff
path: root/src/components/swipe_click
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/swipe_click')
-rw-r--r--src/components/swipe_click/swipe_click.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/components/swipe_click/swipe_click.js b/src/components/swipe_click/swipe_click.js
index 238e6df8..2a423901 100644
--- a/src/components/swipe_click/swipe_click.js
+++ b/src/components/swipe_click/swipe_click.js
@@ -5,6 +5,8 @@ import GestureService from '../../services/gesture_service/gesture_service'
* direction: a vector that indicates the direction of the intended swipe
* threshold: the minimum distance in pixels the swipe has moved on `direction'
* for swipe-finished() to have a non-zero sign
+ * disableClickThreshold: the minimum distance in pixels for the swipe to
+ * not trigger a click
* perpendicularTolerance: see gesture_service
*
* Events:
@@ -34,6 +36,10 @@ const SwipeClick = {
type: Function,
default: () => 30
},
+ disableClickThreshold: {
+ type: Function,
+ default: () => 1
+ },
perpendicularTolerance: {
type: Number,
default: 1.0
@@ -72,6 +78,7 @@ const SwipeClick = {
this.$gesture = new GestureService.SwipeAndClickGesture({
direction: this.direction,
threshold: this.threshold,
+ disableClickThreshold: this.disableClickThreshold,
perpendicularTolerance: this.perpendicularTolerance,
swipePreviewCallback: this.preview,
swipeEndCallback: this.end,