Merge branch 'main' into feature/#49-Update-focus-event-for-touch
This commit is contained in:
@@ -91,6 +91,11 @@
|
||||
*/
|
||||
export let dots = true
|
||||
|
||||
/**
|
||||
* Enable swiping
|
||||
*/
|
||||
export let swiping = true
|
||||
|
||||
export async function goTo(pageIndex, options) {
|
||||
const animated = get(options, 'animated', true)
|
||||
if (typeof pageIndex !== 'number') {
|
||||
@@ -283,15 +288,19 @@
|
||||
|
||||
// gestures
|
||||
function handleSwipeStart() {
|
||||
if (!swiping) return
|
||||
_duration = 0
|
||||
}
|
||||
async function handleThreshold(event) {
|
||||
if (!swiping) return
|
||||
await directionFnDescription[event.detail.direction]()
|
||||
}
|
||||
function handleSwipeMove(event) {
|
||||
if (!swiping) return
|
||||
offset += event.detail.dx
|
||||
}
|
||||
function handleSwipeEnd() {
|
||||
if (!swiping) return
|
||||
showPage(currentPageIndex)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user