svelte-gestures
Advanced tools
Comparing version 1.0.6 to 1.1.0
# Changelog | ||
## 1.1.0 | ||
Core lib function `setPointerControls` now accept argument, by which one can manually set `touch-action` css property. It is not used in swipe recogniser. | ||
## 1.0.6 | ||
@@ -4,0 +7,0 @@ |
@@ -5,3 +5,3 @@ { | ||
"repository": "https://github.com/Rezi/svelte-gestures", | ||
"version": "1.0.6", | ||
"version": "1.1.0", | ||
"main": "dist/index.umd.min.js", | ||
@@ -8,0 +8,0 @@ "module": "dist/index.es.js", |
@@ -100,3 +100,6 @@ # svelte-gestures | ||
Swipe action fires `swipe` event: `event.detail.direction`. It accepts props as parameter: `{ timeframe: number; minSwipeDistance: number }` with default values 300ms and 60px. Swipe is fired if preset distance in propper direction is done in preset time. | ||
Swipe action fires `swipe` event: `event.detail.direction`. It accepts props as parameter: `{ timeframe: number; minSwipeDistance: number; touchAction: string }` with default values 300ms, 60px and `none`. | ||
Swipe is fired if preset distance in proper direction is done in preset time. | ||
You can use the [touchAction](https://developer.mozilla.org/en/docs/Web/CSS/touch-action) parameter to control the default behaviour of the browser. | ||
For example if you only use left/right swipe and want to keep the default browser behaviour (scrolling) for up/down swipe use `touchAction: 'pan-y'`. | ||
@@ -103,0 +106,0 @@ `event.detail.direction` represents direction of swipe: 'top' | 'right' | 'bottom' | 'left' |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
25063
248