#31 : Fix swipe
This commit is contained in:
@@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
const dispatch = createEventDispatcher()
|
const dispatch = createEventDispatcher()
|
||||||
|
|
||||||
const directionFnDescription = {
|
const autoplayDirectionFnDescription = {
|
||||||
[NEXT]: () => {
|
[NEXT]: () => {
|
||||||
progressManager.start(() => {
|
progressManager.start(() => {
|
||||||
showNextPage()
|
showNextPage()
|
||||||
@@ -30,6 +30,15 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const directionFnDescription = {
|
||||||
|
[NEXT]: () => {
|
||||||
|
showNextPage()
|
||||||
|
},
|
||||||
|
[PREV]: () => {
|
||||||
|
showPrevPage()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* CSS animation timing function
|
* CSS animation timing function
|
||||||
* examples: 'linear', 'steps(5, end)', 'cubic-bezier(0.1, -0.6, 0.2, 0)'
|
* examples: 'linear', 'steps(5, end)', 'cubic-bezier(0.1, -0.6, 0.2, 0)'
|
||||||
@@ -161,7 +170,7 @@
|
|||||||
|
|
||||||
function applyAutoplay() {
|
function applyAutoplay() {
|
||||||
if (autoplay) {
|
if (autoplay) {
|
||||||
directionFnDescription[autoplayDirection]()
|
autoplayDirectionFnDescription[autoplayDirection]()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user