Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

Request: Change verticalDistanceThreshold to swipeSupressionThreshold for consistency

brettdewoody edited this page Jan 26, 2012 · 1 revision

In fine-tuning our iPad app we started experimenting with the configurable swipe event thresholds. We quickly realized we were all interpreting the variables differently and found it hard to wrap our heads around what each did.

I think a change of variable name/definition might clear up some of the confusion. Here are the current variables with their definitions:

  • scrollSupressionThreshold (default: 10px) – More than this horizontal displacement, and we will suppress scrolling
  • durationThreshold (default: 1000ms) – More time than this, and it isn’t a swipe
  • horizontalDistanceThreshold (default: 30px) – Swipe horizontal displacement must be more than this.
  • verticalDistanceThreshold (default: 75px) – Swipe vertical displacement must be less than this.

I think changing the name/definition of verticalDistanceThreshold might make it easier to understand, and is more consistent with the other definitions.

  • scrollSupressionThreshold (default: 10px) – More than this horizontal displacement, and we will suppress scrolling
  • durationThreshold (default: 1000ms) – More time than this, and it isn’t a swipe
  • horizontalDistanceThreshold (default: 30px) – Swipe horizontal displacement must be more than this.
  • swipeSupressionThreshold (default: 75px) – More than this vertical displacement, and we will suppress swiping.